diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-01 03:06:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-01 03:06:02 +0300 |
commit | 8078bd185fd9fce86cb5a8d9a6b6209e0c23ae44 (patch) | |
tree | 6bce184b45888ebeacc7060c84b892ecbd67a4ca /spec/controllers/ldap/omniauth_callbacks_controller_spec.rb | |
parent | 8f210aebe1d740e8ee194f171f1f33a6e1fba313 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/ldap/omniauth_callbacks_controller_spec.rb')
-rw-r--r-- | spec/controllers/ldap/omniauth_callbacks_controller_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/controllers/ldap/omniauth_callbacks_controller_spec.rb b/spec/controllers/ldap/omniauth_callbacks_controller_spec.rb index 6d588c8f915..ceab9754617 100644 --- a/spec/controllers/ldap/omniauth_callbacks_controller_spec.rb +++ b/spec/controllers/ldap/omniauth_callbacks_controller_spec.rb @@ -11,6 +11,14 @@ describe Ldap::OmniauthCallbacksController do expect(request.env['warden']).to be_authenticated end + context 'with sign in prevented' do + let(:ldap_settings) { ldap_setting_defaults.merge(prevent_ldap_sign_in: true) } + + it 'does not allow sign in' do + expect { post provider }.to raise_error(ActionController::UrlGenerationError) + end + end + it 'respects remember me checkbox' do expect do post provider, params: { remember_me: '1' } |