diff options
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 |