diff options
Diffstat (limited to 'spec/lib/gitlab/auth/saml/user_spec.rb')
-rw-r--r-- | spec/lib/gitlab/auth/saml/user_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/lib/gitlab/auth/saml/user_spec.rb b/spec/lib/gitlab/auth/saml/user_spec.rb index 796512bc52b..a8a5d8ae5df 100644 --- a/spec/lib/gitlab/auth/saml/user_spec.rb +++ b/spec/lib/gitlab/auth/saml/user_spec.rb @@ -46,6 +46,10 @@ RSpec.describe Gitlab::Auth::Saml::User do end context 'external groups' do + before do + stub_saml_group_config(%w(Interns)) + end + context 'are defined' do it 'marks the user as external' do stub_saml_group_config(%w(Freelancers)) @@ -55,10 +59,6 @@ RSpec.describe Gitlab::Auth::Saml::User do end end - before do - stub_saml_group_config(%w(Interns)) - end - context 'are defined but the user does not belong there' do it 'does not mark the user as external' do saml_user.save # rubocop:disable Rails/SaveBang @@ -317,7 +317,7 @@ RSpec.describe Gitlab::Auth::Saml::User do context 'when user confirmation email is enabled' do before do - stub_application_setting send_user_confirmation_email: true + stub_application_setting_enum('email_confirmation_setting', 'hard') end it 'creates and confirms the user anyway' do |