1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/test/cases/queuing_test.rb

20 lines
358 B
Ruby
Raw Normal View History

2014-05-18 05:44:28 -04:00
require 'helper'
2014-05-18 06:32:22 -04:00
require 'jobs/hello_job'
2014-05-18 05:44:28 -04:00
class QueuingTest < ActiveSupport::TestCase
2014-05-18 06:32:22 -04:00
setup do
$BUFFER = []
end
test 'run queued job' do
HelloJob.enqueue
assert_equal "David says hello", $BUFFER.pop
end
test 'run queued job with parameters' do
HelloJob.enqueue "Jamie"
assert_equal "Jamie says hello", $BUFFER.pop
2014-05-18 05:44:28 -04:00
end
end