aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/queueing/test_queue_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/railties/test/queueing/test_queue_test.rb b/railties/test/queueing/test_queue_test.rb
index fdceb5d1b5..78c6c617fe 100644
--- a/railties/test/queueing/test_queue_test.rb
+++ b/railties/test/queueing/test_queue_test.rb
@@ -16,6 +16,17 @@ class TestQueueTest < ActiveSupport::TestCase
@queue = Rails::Queueing::TestQueue.new
end
+ def test_drain_raises
+ @queue.push Job.new { raise }
+ assert_raises(RuntimeError) { @queue.drain }
+ end
+
+ def test_jobs
+ @queue.push 1
+ @queue.push 2
+ assert_equal [1,2], @queue.jobs
+ end
+
def test_contents
assert @queue.empty?
job = Job.new