discourse/spec/components/jobs/jobs_base_spec.rb

18 lines
476 B
Ruby
Raw Normal View History

2013-02-05 14:16:51 -05:00
require 'spec_helper'
require 'jobs'
describe Jobs::Base do
it 'delegates the process call to execute' do
Jobs::Base.any_instance.expects(:execute).with('hello' => 'world')
Jobs::Base.new.perform('hello' => 'world', 'sync_exec' => true)
end
it 'converts to an indifferent access hash' do
Jobs::Base.any_instance.expects(:execute).with(instance_of(HashWithIndifferentAccess))
Jobs::Base.new.perform('hello' => 'world', 'sync_exec' => true)
2013-02-25 11:42:20 -05:00
end
2013-02-05 14:16:51 -05:00
end