diff options
author | Ari Pollak <ajp@aripollak.com> | 2014-12-01 11:13:49 -0500 |
---|---|---|
committer | Ari Pollak <ajp@aripollak.com> | 2014-12-01 11:16:30 -0500 |
commit | 25c8ea264ea4d690da00439d1414083750a52616 (patch) | |
tree | 774e13ab81988cb5da5b7f565205e4c752b738cf /activejob/test/cases | |
parent | 802630378e5ed7ffae500034bc926b8318524e43 (diff) | |
download | rails-25c8ea264ea4d690da00439d1414083750a52616.tar.gz rails-25c8ea264ea4d690da00439d1414083750a52616.tar.bz2 rails-25c8ea264ea4d690da00439d1414083750a52616.zip |
Only filter GIDable objects; remove cosmetic changes
Diffstat (limited to 'activejob/test/cases')
-rw-r--r-- | activejob/test/cases/logging_test.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/activejob/test/cases/logging_test.rb b/activejob/test/cases/logging_test.rb index e308232073..745aedb6bd 100644 --- a/activejob/test/cases/logging_test.rb +++ b/activejob/test/cases/logging_test.rb @@ -42,24 +42,24 @@ class AdapterTest < ActiveSupport::TestCase def test_uses_active_job_as_tag - HelloJob.perform_later nil + HelloJob.perform_later "Cristian" assert_match(/\[ActiveJob\]/, @logger.messages) end def test_uses_job_name_as_tag - LoggingJob.perform_later nil + LoggingJob.perform_later "Dummy" assert_match(/\[LoggingJob\]/, @logger.messages) end def test_uses_job_id_as_tag - LoggingJob.perform_later nil + LoggingJob.perform_later "Dummy" assert_match(/\[LOGGING-JOB-ID\]/, @logger.messages) end def test_logs_correct_queue_name original_queue_name = LoggingJob.queue_name LoggingJob.queue_as :php_jobs - LoggingJob.perform_later nil + LoggingJob.perform_later("Dummy") assert_match(/to .*?\(php_jobs\).*/, @logger.messages) ensure LoggingJob.queue_name = original_queue_name @@ -75,12 +75,12 @@ class AdapterTest < ActiveSupport::TestCase def test_enqueue_job_logging HelloJob.perform_later "Cristian" - assert_match(/Enqueued HelloJob \(Job ID: .*?\) to .*?:.*\[FILTERED\]/, @logger.messages) + assert_match(/Enqueued HelloJob \(Job ID: .*?\) to .*?:.*Cristian/, @logger.messages) end def test_perform_job_logging LoggingJob.perform_later "Dummy" - assert_match(/Performing LoggingJob from .*? with arguments:.*\[FILTERED\]/, @logger.messages) + assert_match(/Performing LoggingJob from .*? with arguments:.*Dummy/, @logger.messages) assert_match(/Dummy, here is it: Dummy/, @logger.messages) assert_match(/Performed LoggingJob from .*? in .*ms/, @logger.messages) end @@ -90,8 +90,8 @@ class AdapterTest < ActiveSupport::TestCase assert_match(/\[LoggingJob\] \[.*?\]/, @logger.messages) assert_match(/\[ActiveJob\] Enqueued NestedJob \(Job ID: .*\) to/, @logger.messages) assert_match(/\[ActiveJob\] \[NestedJob\] \[NESTED-JOB-ID\] Performing NestedJob from/, @logger.messages) - assert_match(/\[ActiveJob\] \[NestedJob\] \[NESTED-JOB-ID\] Enqueued LoggingJob \(Job ID: .*?\) to .* with arguments: \[FILTERED\]/, @logger.messages) - assert_match(/\[ActiveJob\].*\[LoggingJob\] \[LOGGING-JOB-ID\] Performing LoggingJob from .* with arguments: \[FILTERED\]/, @logger.messages) + assert_match(/\[ActiveJob\] \[NestedJob\] \[NESTED-JOB-ID\] Enqueued LoggingJob \(Job ID: .*?\) to .* with arguments: "NestedJob"/, @logger.messages) + assert_match(/\[ActiveJob\].*\[LoggingJob\] \[LOGGING-JOB-ID\] Performing LoggingJob from .* with arguments: "NestedJob"/, @logger.messages) assert_match(/\[ActiveJob\].*\[LoggingJob\] \[LOGGING-JOB-ID\] Dummy, here is it: NestedJob/, @logger.messages) assert_match(/\[ActiveJob\].*\[LoggingJob\] \[LOGGING-JOB-ID\] Performed LoggingJob from .* in/, @logger.messages) assert_match(/\[ActiveJob\] \[NestedJob\] \[NESTED-JOB-ID\] Performed NestedJob from .* in/, @logger.messages) @@ -99,14 +99,14 @@ class AdapterTest < ActiveSupport::TestCase def test_enqueue_at_job_logging HelloJob.set(wait_until: 24.hours.from_now).perform_later "Cristian" - assert_match(/Enqueued HelloJob \(Job ID: .*\) to .*? at.*\[FILTERED\]/, @logger.messages) + assert_match(/Enqueued HelloJob \(Job ID: .*\) to .*? at.*Cristian/, @logger.messages) rescue NotImplementedError skip end def test_enqueue_in_job_logging HelloJob.set(wait: 2.seconds).perform_later "Cristian" - assert_match(/Enqueued HelloJob \(Job ID: .*\) to .*? at.*\[FILTERED\]/, @logger.messages) + assert_match(/Enqueued HelloJob \(Job ID: .*\) to .*? at.*Cristian/, @logger.messages) rescue NotImplementedError skip end |