1
0
Fork 0
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:
Mike Perham 2012-09-07 09:02:23 -07:00
parent b3757fdfa6
commit cdd23ae43e

View file

@ -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)