Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-14 18:06:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-14 18:06:07 +0300
commit429d1abad29d379d8bc8f5219eb72384ad485deb (patch)
tree5c8f9c96c203dbeb3e3e89f3979ce60453340f3f /spec/requests/openid_connect_spec.rb
parente464f195ff5debc3e9aad0f8c4537404b92019c6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/openid_connect_spec.rb')
-rw-r--r--spec/requests/openid_connect_spec.rb25
1 files changed, 8 insertions, 17 deletions
diff --git a/spec/requests/openid_connect_spec.rb b/spec/requests/openid_connect_spec.rb
index da2e7b71dbe..dfa17c5ff27 100644
--- a/spec/requests/openid_connect_spec.rb
+++ b/spec/requests/openid_connect_spec.rb
@@ -148,34 +148,25 @@ describe 'OpenID Connect requests' do
end
end
- # These 2 calls shouldn't actually throw, they should be handled as an
- # unauthorized request, so we should be able to check the response.
- #
- # This was not possible due to an issue with Warden:
- # https://github.com/hassox/warden/pull/162
- #
- # When the patch gets merged and we update Warden, these specs will need to
- # updated to check the response instead of a raised exception.
- # https://gitlab.com/gitlab-org/gitlab-foss/issues/40218
context 'when user is blocked' do
- it 'returns authentication error' do
+ it 'redirects to login page' do
access_grant
user.block!
- expect do
- request_access_token!
- end.to raise_error UncaughtThrowError
+ request_access_token!
+
+ expect(response).to redirect_to('/users/sign_in')
end
end
context 'when user is ldap_blocked' do
- it 'returns authentication error' do
+ it 'redirects to login page' do
access_grant
user.ldap_block!
- expect do
- request_access_token!
- end.to raise_error UncaughtThrowError
+ request_access_token!
+
+ expect(response).to redirect_to('/users/sign_in')
end
end
end