DEV: Avoid configuring Rails configuration in tests (#18499)

This commit is contained in:
Alan Guo Xiang Tan 2022-10-06 15:45:19 +08:00 committed by GitHub
parent 8ae1edeb79
commit f3392a5a81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -797,8 +797,8 @@ RSpec.describe Auth::DefaultCurrentUserProvider do
describe "first admin user" do
before do
user.update(admin: false, email: "blah@test.com")
Rails.configuration.developer_emails = "blah@test.com"
user.update!(admin: false, email: "blah@test.com")
Rails.configuration.stubs(:developer_emails).returns(["blah@test.com"])
end
it "makes the user into an admin if their email is in DISCOURSE_DEVELOPER_EMAILS" do