1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Make sure log level in development is debug

Laso make sure the tests are actually checking the log level of the app,
not the one we set in the test helper.
This commit is contained in:
Rafael Mendonça França 2020-09-22 16:12:38 +00:00
parent 70018f87f0
commit 7307994011
No known key found for this signature in database
GPG key ID: FC23B6D0F1EEE948
3 changed files with 10 additions and 4 deletions

View file

@ -43,7 +43,7 @@ module Rails
@session_store = nil
@time_zone = "UTC"
@beginning_of_week = :monday
@log_level = :info
@log_level = :debug
@generators = app_generators
@cache_store = [ :file_store, "#{root}/tmp/cache/" ]
@railties_order = [:all]

View file

@ -1577,8 +1577,15 @@ module ApplicationTests
assert_equal session_options, app.config.session_options
end
test "config.log_level defaults to info" do
make_basic_app
test "config.log_level defaults to debug in development" do
app "development"
assert_equal Logger::DEBUG, Rails.logger.level
end
test "config.log_level default to info in production" do
app "production"
assert_equal Logger::INFO, Rails.logger.level
end

View file

@ -206,7 +206,6 @@ module TestHelpers
config.session_store :cookie_store, key: "_myapp_session"
config.active_support.deprecation = :log
config.action_controller.allow_forgery_protection = false
config.log_level = :info
RUBY
end