mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-19 12:02:27 -05:00
18 lines
478 B
Ruby
18 lines
478 B
Ruby
|
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)
|
||
|
end
|
||
|
|
||
|
end
|
||
|
|