aboutsummaryrefslogtreecommitdiffstats
path: root/test/cases/queuing_test.rb
blob: b6180a23dd902d3c0169e17e6819ddf6d1634c9e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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