[deploy] Refactor:Change Unset Var Warnings to Debug Level (#9985)

This commit is contained in:
Molly Struve 2020-08-25 02:45:42 -05:00 committed by GitHub
parent 38d7a7df28
commit ad2184ebf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@ class ApplicationConfig
if ENV.key?(key)
ENV[key]
else
Rails.logger.warn("Unset ENV variable: #{key}.")
Rails.logger.debug("Unset ENV variable: #{key}.")
nil
end
end

View file

@ -2,9 +2,9 @@ require "rails_helper"
describe ApplicationConfig do
it "logs warning if key is not found" do
allow(Rails.logger).to receive(:warn)
allow(Rails.logger).to receive(:debug)
described_class["missing"]
expect(Rails.logger).to have_received(:warn).with("Unset ENV variable: missing.")
expect(Rails.logger).to have_received(:debug).with("Unset ENV variable: missing.")
end
describe ".app_domain_no_port" do