From a338a7a53e71eb5fdc9ba1aa0783071199194a6b Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Mon, 10 Jul 2017 11:12:21 +0900 Subject: [PATCH] Fix the build. --- spec/components/guardian_spec.rb | 1 + spec/controllers/admin/users_controller_spec.rb | 1 + spec/controllers/session_controller_spec.rb | 1 + spec/models/discourse_single_sign_on_spec.rb | 2 ++ 4 files changed, 5 insertions(+) diff --git a/spec/components/guardian_spec.rb b/spec/components/guardian_spec.rb index 27497e4434a..8261d7c0b04 100644 --- a/spec/components/guardian_spec.rb +++ b/spec/components/guardian_spec.rb @@ -2174,6 +2174,7 @@ describe Guardian do context 'when SSO email override is active' do before do + SiteSetting.email_editable = false SiteSetting.enable_sso = true SiteSetting.sso_overrides_email = true end diff --git a/spec/controllers/admin/users_controller_spec.rb b/spec/controllers/admin/users_controller_spec.rb index f0613510857..35e17ec0b4a 100644 --- a/spec/controllers/admin/users_controller_spec.rb +++ b/spec/controllers/admin/users_controller_spec.rb @@ -547,6 +547,7 @@ describe Admin::UsersController do before do log_in(:admin) + SiteSetting.email_editable = false SiteSetting.enable_sso = true SiteSetting.sso_overrides_email = true SiteSetting.sso_overrides_name = true diff --git a/spec/controllers/session_controller_spec.rb b/spec/controllers/session_controller_spec.rb index 7e9c87b6061..bcf81c32c7a 100644 --- a/spec/controllers/session_controller_spec.rb +++ b/spec/controllers/session_controller_spec.rb @@ -343,6 +343,7 @@ describe SessionController do describe 'local attribute override from SSO payload' do before do + SiteSetting.email_editable = false SiteSetting.sso_overrides_email = true SiteSetting.sso_overrides_username = true SiteSetting.sso_overrides_name = true diff --git a/spec/models/discourse_single_sign_on_spec.rb b/spec/models/discourse_single_sign_on_spec.rb index abaab998561..ca3659605fd 100644 --- a/spec/models/discourse_single_sign_on_spec.rb +++ b/spec/models/discourse_single_sign_on_spec.rb @@ -159,6 +159,7 @@ describe DiscourseSingleSignOn do it "can override name / email / username" do admin = Fabricate(:admin) + SiteSetting.email_editable = false SiteSetting.sso_overrides_name = true SiteSetting.sso_overrides_email = true SiteSetting.sso_overrides_username = true @@ -257,6 +258,7 @@ describe DiscourseSingleSignOn do it 'deactivates accounts that have updated email address' do + SiteSetting.email_editable = false SiteSetting.sso_overrides_email = true sso.require_activation = true