mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
19 lines
358 B
Ruby
19 lines
358 B
Ruby
require 'helper'
|
|
require 'jobs/hello_job'
|
|
|
|
|
|
class QueuingTest < ActiveSupport::TestCase
|
|
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
|
|
end
|
|
end
|