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

Fixed specs

parent 5475a96c
...@@ -114,7 +114,7 @@ class SessionsController < Devise::SessionsController ...@@ -114,7 +114,7 @@ class SessionsController < Devise::SessionsController
def gitlab_geo_login def gitlab_geo_login
return unless Gitlab::Geo.secondary? return unless Gitlab::Geo.secondary?
return if signed_in? return if signed_in?
oauth = Gitlab::Geo::OauthSession.new oauth = Gitlab::Geo::OauthSession.new
# share full url with primary node by oauth state # share full url with primary node by oauth state
......
...@@ -24,7 +24,7 @@ module Oauth2 ...@@ -24,7 +24,7 @@ module Oauth2
def access_token def access_token
@access_token ||= begin @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]) oauth_session = Gitlab::Geo::OauthSession.new(state: params[:state])
......
...@@ -81,7 +81,7 @@ describe Oauth::GeoAuthController do ...@@ -81,7 +81,7 @@ describe Oauth::GeoAuthController do
get :callback, state: callback_state get :callback, state: callback_state
expect(response.code).to eq '200' 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 end
end end
......
...@@ -6,11 +6,6 @@ describe Oauth2::LogoutTokenValidationService, services: true do ...@@ -6,11 +6,6 @@ describe Oauth2::LogoutTokenValidationService, services: true do
let(:logout_state) { Gitlab::Geo::OauthSession.new(access_token: access_token).generate_logout_state } let(:logout_state) { Gitlab::Geo::OauthSession.new(access_token: access_token).generate_logout_state }
context '#execute' do 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 it 'return error when params are empty' do
result = described_class.new(user, {}).execute result = described_class.new(user, {}).execute
expect(result[:status]).to eq(:error) 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