diff options
Diffstat (limited to 'spec/controllers/sessions_controller_spec.rb')
-rw-r--r-- | spec/controllers/sessions_controller_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb index 03f4b0ba343..bf922260b2f 100644 --- a/spec/controllers/sessions_controller_spec.rb +++ b/spec/controllers/sessions_controller_spec.rb @@ -9,8 +9,8 @@ describe SessionsController do context 'when auto sign-in is enabled' do before do stub_omniauth_setting(auto_sign_in_with_provider: :saml) - allow(controller).to receive(:omniauth_authorize_path).with(:user, :saml). - and_return('/saml') + allow(controller).to receive(:omniauth_authorize_path).with(:user, :saml) + .and_return('/saml') end context 'and no auto_sign_in param is passed' do @@ -89,8 +89,8 @@ describe SessionsController do context 'remember_me field' do it 'sets a remember_user_token cookie when enabled' do allow(controller).to receive(:find_user).and_return(user) - expect(controller). - to receive(:remember_me).with(user).and_call_original + expect(controller) + .to receive(:remember_me).with(user).and_call_original authenticate_2fa(remember_me: '1', otp_attempt: user.current_otp) @@ -228,8 +228,8 @@ describe SessionsController do it 'sets a remember_user_token cookie when enabled' do allow(U2fRegistration).to receive(:authenticate).and_return(true) allow(controller).to receive(:find_user).and_return(user) - expect(controller). - to receive(:remember_me).with(user).and_call_original + expect(controller) + .to receive(:remember_me).with(user).and_call_original authenticate_2fa_u2f(remember_me: '1', login: user.username, device_response: "{}") @@ -262,8 +262,8 @@ describe SessionsController do it 'redirects correctly for referer on same host with params' do search_path = '/search?search=seed_project' - allow(controller.request).to receive(:referer). - and_return('http://%{host}%{path}' % { host: Gitlab.config.gitlab.host, path: search_path }) + allow(controller.request).to receive(:referer) + .and_return('http://%{host}%{path}' % { host: Gitlab.config.gitlab.host, path: search_path }) get(:new, redirect_to_referer: :yes) |