discourse/spec/components/jobs/jobs_base_spec.rb

18 lines
476 B
Ruby
Raw Normal View History

2013-02-06 03:16:51 +08: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-26 00:42:20 +08:00
end
2013-02-06 03:16:51 +08:00
end