discourse/spec/jobs/jobs_base_spec.rb
Sam f0a122a66c move job files so they live underneath app/ and not in lib/
introduce new setting email_always, that will force emails to send to users regardless of presence on site
2013-10-01 17:04:02 +10:00

17 lines
492 B
Ruby

require 'spec_helper'
require_dependency 'jobs/base'
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)
end
end