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
This commit is contained in:
commit
37cca88d05
|
@ -107,6 +107,15 @@ describe 'OpenID Connect requests' do
|
||||||
end
|
end
|
||||||
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
|
context 'when user is blocked' do
|
||||||
it 'returns authentication error' do
|
it 'returns authentication error' do
|
||||||
access_grant
|
access_grant
|
||||||
|
@ -114,7 +123,7 @@ describe 'OpenID Connect requests' do
|
||||||
|
|
||||||
expect do
|
expect do
|
||||||
request_access_token
|
request_access_token
|
||||||
end.to throw_symbol :warden
|
end.to raise_error UncaughtThrowError
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -125,7 +134,7 @@ describe 'OpenID Connect requests' do
|
||||||
|
|
||||||
expect do
|
expect do
|
||||||
request_access_token
|
request_access_token
|
||||||
end.to throw_symbol :warden
|
end.to raise_error UncaughtThrowError
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue