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