summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorFrancisco Lopez <fjlopez@gitlab.com>2017-11-16 15:39:30 +0100
committerFrancisco Lopez <fjlopez@gitlab.com>2017-11-17 10:02:11 +0100
commitaa84ef1e1af0bac40279e02e4ce889cb660ed9d0 (patch)
tree3fe0bd2c53236abd49f017c7711decd1980900b5 /spec/requests
parent98f7982ceccd6f7996774911632943e9f43df6e3 (diff)
downloadgitlab-ce-aa84ef1e1af0bac40279e02e4ce889cb660ed9d0.tar.gz
Moving exceptions to UserAuthFinders
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/api/helpers_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/requests/api/helpers_spec.rb b/spec/requests/api/helpers_spec.rb
index dbb82136919..919df575c6e 100644
--- a/spec/requests/api/helpers_spec.rb
+++ b/spec/requests/api/helpers_spec.rb
@@ -166,21 +166,21 @@ describe API::Helpers do
personal_access_token = create(:personal_access_token, user: user, scopes: ['read_user'])
env[Gitlab::Auth::UserAuthFinders::PRIVATE_TOKEN_HEADER] = personal_access_token.token
- expect { current_user }.to raise_error API::APIGuard::InsufficientScopeError
+ expect { current_user }.to raise_error Gitlab::Auth::UserAuthFinders::InsufficientScopeError
end
it 'does not allow revoked tokens' do
personal_access_token.revoke!
env[Gitlab::Auth::UserAuthFinders::PRIVATE_TOKEN_HEADER] = personal_access_token.token
- expect { current_user }.to raise_error API::APIGuard::RevokedError
+ expect { current_user }.to raise_error Gitlab::Auth::UserAuthFinders::RevokedError
end
it 'does not allow expired tokens' do
personal_access_token.update_attributes!(expires_at: 1.day.ago)
env[Gitlab::Auth::UserAuthFinders::PRIVATE_TOKEN_HEADER] = personal_access_token.token
- expect { current_user }.to raise_error API::APIGuard::ExpiredError
+ expect { current_user }.to raise_error Gitlab::Auth::UserAuthFinders::ExpiredError
end
end
end
@@ -392,7 +392,7 @@ describe API::Helpers do
end
it 'raises an error' do
- expect { current_user }.to raise_error API::APIGuard::InsufficientScopeError
+ expect { current_user }.to raise_error Gitlab::Auth::UserAuthFinders::InsufficientScopeError
end
end
end