discourse/spec/jobs/jobs_base_spec.rb

18 lines
492 B
Ruby
Raw Normal View History

2013-02-06 03:16:51 +08:00
require 'spec_helper'
require_dependency 'jobs/base'
2013-02-06 03:16:51 +08:00
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