diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-18 03:08:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-18 03:08:58 +0300 |
commit | 099333e261623df9b960419e2761b2cbb0eb3882 (patch) | |
tree | 47d05cc18d6b20a16982b33e00bd1d144563f9e3 /spec/spec_helper.rb | |
parent | a0b4a462b0c6f333651ae9e0c0ca1e5794e7b4e1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 5ffc9d778d1..d12b960d4fc 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -297,7 +297,7 @@ RSpec.configure do |config| Sidekiq::Worker.clear_all # Administrators have to re-authenticate in order to access administrative - # functionality when feature flag :user_mode_in_session is active. Any spec + # functionality when application setting admin_mode is active. Any spec # that requires administrative access can use the tag :enable_admin_mode # to avoid the second auth step (provided the user is already an admin): # @@ -314,6 +314,9 @@ RSpec.configure do |config| end end + # Make sure specs test by default admin mode setting on, unless forced to the opposite + stub_application_setting(admin_mode: true) unless example.metadata[:do_not_mock_admin_mode_setting] + allow(Gitlab::CurrentSettings).to receive(:current_application_settings?).and_return(false) end |