diff options
Diffstat (limited to 'test/cases')
-rw-r--r-- | test/cases/queuing_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/cases/queuing_test.rb b/test/cases/queuing_test.rb index b6180a23dd..958b81ca3a 100644 --- a/test/cases/queuing_test.rb +++ b/test/cases/queuing_test.rb @@ -1,5 +1,6 @@ require 'helper' require 'jobs/hello_job' +require 'active_support/core_ext/numeric/time' class QueuingTest < ActiveSupport::TestCase @@ -16,4 +17,12 @@ class QueuingTest < ActiveSupport::TestCase HelloJob.enqueue "Jamie" assert_equal "Jamie says hello", $BUFFER.pop end + + test 'run queued job later' do + begin + result = HelloJob.enqueue_at 1.second.ago, "Jamie" + assert result + rescue NotImplementedError + end + end end |