diff options
Diffstat (limited to 'activejob/test/cases/logging_test.rb')
-rw-r--r-- | activejob/test/cases/logging_test.rb | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/activejob/test/cases/logging_test.rb b/activejob/test/cases/logging_test.rb index 820e9112de..954974b2a5 100644 --- a/activejob/test/cases/logging_test.rb +++ b/activejob/test/cases/logging_test.rb @@ -1,10 +1,11 @@ -require 'helper' +require "helper" require "active_support/log_subscriber/test_helper" -require 'active_support/core_ext/numeric/time' -require 'jobs/hello_job' -require 'jobs/logging_job' -require 'jobs/nested_job' -require 'models/person' +require "active_support/core_ext/numeric/time" +require "jobs/hello_job" +require "jobs/logging_job" +require "jobs/overridden_logging_job" +require "jobs/nested_job" +require "models/person" class LoggingTest < ActiveSupport::TestCase include ActiveSupport::LogSubscriber::TestHelper @@ -41,7 +42,6 @@ class LoggingTest < ActiveSupport::TestCase ActiveJob::Base.logger = logger end - def test_uses_active_job_as_tag HelloJob.perform_later "Cristian" assert_match(/\[ActiveJob\]/, @logger.messages) @@ -119,4 +119,9 @@ class LoggingTest < ActiveSupport::TestCase rescue NotImplementedError skip end + + def test_for_tagged_logger_support_is_consistent + set_logger ::Logger.new(nil) + OverriddenLoggingJob.perform_later "Dummy" + end end |