mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
4382fcbc22
Example of `assert_enqueued_with` with no block ```ruby def test_assert_enqueued_with MyJob.perform_later(1,2,3) assert_enqueued_with(job: MyJob, args: [1,2,3], queue: 'low') MyJob.set(wait_until: Date.tomorrow.noon).perform_later assert_enqueued_with(job: MyJob, at: Date.tomorrow.noon) end ``` Example of `assert_enqueued_email_with` with no block: ```ruby def test_email ContactMailer.welcome.deliver_later assert_enqueued_email_with ContactMailer, :welcome end def test_email_with_arguments ContactMailer.welcome("Hello", "Goodbye").deliver_later assert_enqueued_email_with ContactMailer, :welcome, args: ["Hello", "Goodbye"] end ``` Related to #33243 |
||
---|---|---|
.. | ||
adapter_test.rb | ||
argument_serialization_test.rb | ||
callbacks_test.rb | ||
exceptions_test.rb | ||
job_serialization_test.rb | ||
logging_test.rb | ||
queue_adapter_test.rb | ||
queue_naming_test.rb | ||
queue_priority_test.rb | ||
queuing_test.rb | ||
rescue_test.rb | ||
serializers_test.rb | ||
test_case_test.rb | ||
test_helper_test.rb | ||
timezones_test.rb | ||
translation_test.rb |