mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix ActionPack tests after changes to missing template logger
After merging #19377 ActionPack tests were missing a require for `ActiveSupport::LogSubscriber::TestHelper` and change didn't take into account that logger could be nil. Added the require and only log to info if logger exists. This wasn't caught earlier because these tests only run after a merge.
This commit is contained in:
parent
6b98fbacf7
commit
188934cdac
2 changed files with 2 additions and 1 deletions
|
@ -10,7 +10,7 @@ module ActionController
|
|||
if template_exists?(action_name.to_s, _prefixes, variants: request.variant)
|
||||
render(*args)
|
||||
else
|
||||
logger.info "No template found for #{self.class.name}\##{action_name}, rendering head :no_content"
|
||||
logger.info "No template found for #{self.class.name}\##{action_name}, rendering head :no_content" if logger
|
||||
head :no_content
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
require 'abstract_unit'
|
||||
require "active_support/log_subscriber/test_helper"
|
||||
|
||||
class RespondToController < ActionController::Base
|
||||
layout :set_layout
|
||||
|
|
Loading…
Reference in a new issue