diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-03-18 23:02:30 +0300 |
commit | 41fe97390ceddf945f3d967b8fdb3de4c66b7dea (patch) | |
tree | 9c8d89a8624828992f06d892cd2f43818ff5dcc8 /spec/requests/api/group_clusters_spec.rb | |
parent | 0804d2dc31052fb45a1efecedc8e06ce9bc32862 (diff) |
Add latest changes from gitlab-org/gitlab@14-9-stable-eev14.9.0-rc42
Diffstat (limited to 'spec/requests/api/group_clusters_spec.rb')
-rw-r--r-- | spec/requests/api/group_clusters_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/requests/api/group_clusters_spec.rb b/spec/requests/api/group_clusters_spec.rb index c48b5007f91..8e127bf0710 100644 --- a/spec/requests/api/group_clusters_spec.rb +++ b/spec/requests/api/group_clusters_spec.rb @@ -22,6 +22,10 @@ RSpec.describe API::GroupClusters do groups: [group]) end + include_examples ':certificate_based_clusters feature flag API responses' do + let(:subject) { get api("/groups/#{group.id}/clusters", current_user) } + end + context 'non-authorized user' do it 'responds with 403' do get api("/groups/#{group.id}/clusters", unauthorized_user) @@ -66,6 +70,10 @@ RSpec.describe API::GroupClusters do groups: [group]) end + include_examples ':certificate_based_clusters feature flag API responses' do + let(:subject) { get api("/groups/#{group.id}/clusters/#{cluster_id}", current_user) } + end + context 'non-authorized user' do it 'responds with 403' do get api("/groups/#{group.id}/clusters/#{cluster_id}", unauthorized_user) @@ -181,6 +189,10 @@ RSpec.describe API::GroupClusters do } end + include_examples ':certificate_based_clusters feature flag API responses' do + let(:subject) { post api("/groups/#{group.id}/clusters/user", current_user), params: cluster_params } + end + context 'non-authorized user' do it 'responds with 403' do post api("/groups/#{group.id}/clusters/user", unauthorized_user), params: cluster_params @@ -362,6 +374,10 @@ RSpec.describe API::GroupClusters do groups: [group], domain: 'old-domain.com') end + include_examples ':certificate_based_clusters feature flag API responses' do + let(:subject) { put api("/groups/#{group.id}/clusters/#{cluster.id}", current_user), params: update_params } + end + context 'non-authorized user' do it 'responds with 403' do put api("/groups/#{group.id}/clusters/#{cluster.id}", unauthorized_user), params: update_params @@ -503,6 +519,10 @@ RSpec.describe API::GroupClusters do groups: [group]) end + include_examples ':certificate_based_clusters feature flag API responses' do + let(:subject) { delete api("/groups/#{group.id}/clusters/#{cluster.id}", current_user), params: cluster_params } + end + context 'non-authorized user' do it 'responds with 403' do delete api("/groups/#{group.id}/clusters/#{cluster.id}", unauthorized_user), params: cluster_params |