diff options
| author | Sean McGivern <sean@mcgivern.me.uk> | 2017-11-16 13:13:53 +0000 |
|---|---|---|
| committer | Tiago <tiagonbotelho@hotmail.com> | 2017-11-17 10:21:24 +0000 |
| commit | 5a488a6ae3606bc11b8685ae4375a9cf04962ad0 (patch) | |
| tree | db1e0335270435d8c34b33cea65784e4d5152027 | |
| parent | 072709ae186aa9e71dfdd5e28549d1a7f6e0904e (diff) | |
| download | gitlab-ce-5a488a6ae3606bc11b8685ae4375a9cf04962ad0.tar.gz | |
Merge branch 'bvl-adjust-openid_connect_spec' into 'master'
Adjust openid_connect_spec to use `raise_error`
Closes #40093
See merge request gitlab-org/gitlab-ce!15420
(cherry picked from commit 37cca88d055491d1b2b15b72aa6968eb076da2a0)
a37427f6 Adjust openid_connect_spec to use `raise_error`
| -rw-r--r-- | spec/requests/openid_connect_spec.rb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/spec/requests/openid_connect_spec.rb b/spec/requests/openid_connect_spec.rb index 0b1f8ce6f6d..1a5ad9b04e4 100644 --- a/spec/requests/openid_connect_spec.rb +++ b/spec/requests/openid_connect_spec.rb @@ -107,6 +107,15 @@ 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-ce/issues/40218 context 'when user is blocked' do it 'returns authentication error' do access_grant @@ -114,7 +123,7 @@ describe 'OpenID Connect requests' do expect do request_access_token - end.to throw_symbol :warden + end.to raise_error UncaughtThrowError end end @@ -125,7 +134,7 @@ describe 'OpenID Connect requests' do expect do request_access_token - end.to throw_symbol :warden + end.to raise_error UncaughtThrowError end end end |
