diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-09-09 13:46:43 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-09-09 13:46:43 +0900 |
commit | 9d848d8545e2f0159d2fcee21fdfbaa1421d1489 (patch) | |
tree | b972c57f74a55ffaccb84f97ac857b86b55972c4 /activejob/test | |
parent | fc173b0a2452dcaa527fd21d264ba2296d4fa72a (diff) | |
download | rails-9d848d8545e2f0159d2fcee21fdfbaa1421d1489.tar.gz rails-9d848d8545e2f0159d2fcee21fdfbaa1421d1489.tar.bz2 rails-9d848d8545e2f0159d2fcee21fdfbaa1421d1489.zip |
Add missing `perform_enqueued_jobs` to error logging test
Without `perform_enqueued_jobs`, job are not executed and assertion is not done.
Diffstat (limited to 'activejob/test')
-rw-r--r-- | activejob/test/cases/logging_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activejob/test/cases/logging_test.rb b/activejob/test/cases/logging_test.rb index 4041f5f8c0..2e8d2ef7c0 100644 --- a/activejob/test/cases/logging_test.rb +++ b/activejob/test/cases/logging_test.rb @@ -160,7 +160,7 @@ class LoggingTest < ActiveSupport::TestCase end def test_job_error_logging - RescueJob.perform_later "other" + perform_enqueued_jobs { RescueJob.perform_later "other" } rescue RescueJob::OtherError assert_match(/Performing RescueJob \(Job ID: .*?\) from .*? with arguments:.*other/, @logger.messages) assert_match(/Error performing RescueJob \(Job ID: .*?\) from .*? in .*ms: RescueJob::OtherError \(Bad hair\):\n.*\brescue_job\.rb:\d+:in `perform'/, @logger.messages) |