From f3392a5a81110eda546b4cb648fe49391c090b3c Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Thu, 6 Oct 2022 15:45:19 +0800 Subject: [PATCH] DEV: Avoid configuring Rails configuration in tests (#18499) --- spec/lib/auth/default_current_user_provider_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/lib/auth/default_current_user_provider_spec.rb b/spec/lib/auth/default_current_user_provider_spec.rb index 74c45f21f53..9c542e7965a 100644 --- a/spec/lib/auth/default_current_user_provider_spec.rb +++ b/spec/lib/auth/default_current_user_provider_spec.rb @@ -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