mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Now with test!
This commit is contained in:
parent
b3757fdfa6
commit
cdd23ae43e
1 changed files with 7 additions and 0 deletions
|
@ -48,6 +48,7 @@ class TestTesting < MiniTest::Unit::TestCase
|
|||
|
||||
before do
|
||||
load 'sidekiq/testing.rb'
|
||||
EnqueuedWorker.jobs.clear
|
||||
end
|
||||
|
||||
after do
|
||||
|
@ -93,6 +94,12 @@ class TestTesting < MiniTest::Unit::TestCase
|
|||
assert_equal 1, EnqueuedWorker.jobs.size
|
||||
end
|
||||
|
||||
it 'stubs the enqueue_to call' do
|
||||
assert_equal 0, EnqueuedWorker.jobs.size
|
||||
assert Sidekiq::Client.enqueue_to('someq', EnqueuedWorker, 1, 2)
|
||||
assert_equal 1, EnqueuedWorker.jobs.size
|
||||
end
|
||||
|
||||
it 'executes all stored jobs' do
|
||||
assert StoredWorker.perform_async(false)
|
||||
assert StoredWorker.perform_async(true)
|
||||
|
|
Loading…
Reference in a new issue