Commit 33d52209 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Fixed specs

parent 5475a96c
......@@ -114,7 +114,7 @@ class SessionsController < Devise::SessionsController
def gitlab_geo_login
return unless Gitlab::Geo.secondary?
return if signed_in?
oauth = Gitlab::Geo::OauthSession.new
# share full url with primary node by oauth state
......
......@@ -24,7 +24,7 @@ module Oauth2
def access_token
@access_token ||= begin
return unless params[:state] && !params[:state].empty?
return unless params[:state] && !params[:state].empty?
oauth_session = Gitlab::Geo::OauthSession.new(state: params[:state])
......
......@@ -81,7 +81,7 @@ describe Oauth::GeoAuthController do
get :callback, state: callback_state
expect(response.code).to eq '200'
expect(response.body).to include('Your account must have been deleted')
expect(response.body).to include('Your account may have been deleted')
end
end
end
......
......@@ -6,11 +6,6 @@ describe Oauth2::LogoutTokenValidationService, services: true do
let(:logout_state) { Gitlab::Geo::OauthSession.new(access_token: access_token).generate_logout_state }
context '#execute' do
it 'returns error when params are nil' do
result = described_class.new(user, nil).execute
expect(result[:status]).to eq(:error)
end
it 'return error when params are empty' do
result = described_class.new(user, {}).execute
expect(result[:status]).to eq(:error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment