diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-20 16:37:47 +0300 |
commit | aee0a117a889461ce8ced6fcf73207fe017f1d99 (patch) | |
tree | 891d9ef189227a8445d83f35c1b0fc99573f4380 /spec/requests/openid_connect_spec.rb | |
parent | 8d46af3258650d305f53b819eabf7ab18d22f59e (diff) |
Add latest changes from gitlab-org/gitlab@14-6-stable-eev14.6.0-rc42
Diffstat (limited to 'spec/requests/openid_connect_spec.rb')
-rw-r--r-- | spec/requests/openid_connect_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/requests/openid_connect_spec.rb b/spec/requests/openid_connect_spec.rb index 5ec23382698..8ee752da44e 100644 --- a/spec/requests/openid_connect_spec.rb +++ b/spec/requests/openid_connect_spec.rb @@ -37,7 +37,10 @@ RSpec.describe 'OpenID Connect requests' do 'website' => 'https://example.com', 'profile' => 'http://localhost/alice', 'picture' => "http://localhost/uploads/-/system/user/avatar/#{user.id}/dk.png", - 'groups' => kind_of(Array) + 'groups' => kind_of(Array), + 'https://gitlab.org/claims/groups/owner' => kind_of(Array), + 'https://gitlab.org/claims/groups/maintainer' => kind_of(Array), + 'https://gitlab.org/claims/groups/developer' => kind_of(Array) } end @@ -119,6 +122,7 @@ RSpec.describe 'OpenID Connect requests' do before do group1.add_user(user, GroupMember::OWNER) group3.add_user(user, Gitlab::Access::DEVELOPER) + group4.add_user(user, Gitlab::Access::MAINTAINER) request_user_info! end @@ -129,6 +133,10 @@ RSpec.describe 'OpenID Connect requests' do expected_groups = [group1.full_path, group3.full_path] expected_groups << group4.full_path expect(json_response['groups']).to match_array(expected_groups) + + expect(json_response['https://gitlab.org/claims/groups/owner']).to match_array([group1.full_path]) + expect(json_response['https://gitlab.org/claims/groups/maintainer']).to match_array([group4.full_path]) + expect(json_response['https://gitlab.org/claims/groups/developer']).to match_array([group3.full_path]) end it 'does not include any unknown claims' do |