summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorImre Farkas <ifarkas@gitlab.com>2019-07-17 07:20:17 +0000
committerJames Lopez <james@gitlab.com>2019-07-17 07:20:17 +0000
commit7aa1d17475e677fc47af450d033a781cfe505aa6 (patch)
treeaa9eea4cd67befc868c9f9a354635ba4146b1e5e /spec
parent1574d2839fa9a4258e28af92ed0c5c07df424161 (diff)
downloadgitlab-ce-7aa1d17475e677fc47af450d033a781cfe505aa6.tar.gz
CE port of "Move external authorization service API management to EE"
EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/14598
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/api/projects_spec.rb49
1 files changed, 0 insertions, 49 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb
index a2aae257352..fee300e9d7a 100644
--- a/spec/requests/api/projects_spec.rb
+++ b/spec/requests/api/projects_spec.rb
@@ -46,8 +46,6 @@ shared_examples 'languages and percentages JSON response' do
end
describe API::Projects do
- include ExternalAuthorizationServiceHelpers
-
let(:user) { create(:user) }
let(:user2) { create(:user) }
let(:user3) { create(:user) }
@@ -1425,39 +1423,6 @@ describe API::Projects do
end
end
end
-
- context 'with external authorization' do
- let(:project) do
- create(:project,
- namespace: user.namespace,
- external_authorization_classification_label: 'the-label')
- end
-
- context 'when the user has access to the project' do
- before do
- external_service_allow_access(user, project)
- end
-
- it 'includes the label in the response' do
- get api("/projects/#{project.id}", user)
-
- expect(response).to have_gitlab_http_status(200)
- expect(json_response['external_authorization_classification_label']).to eq('the-label')
- end
- end
-
- context 'when the external service denies access' do
- before do
- external_service_deny_access(user, project)
- end
-
- it 'returns a 404' do
- get api("/projects/#{project.id}", user)
-
- expect(response).to have_gitlab_http_status(404)
- end
- end
- end
end
describe 'GET /projects/:id/users' do
@@ -2061,20 +2026,6 @@ describe API::Projects do
expect(response).to have_gitlab_http_status(403)
end
end
-
- context 'when updating external classification' do
- before do
- enable_external_authorization_service_check
- end
-
- it 'updates the classification label' do
- put(api("/projects/#{project.id}", user), params: { external_authorization_classification_label: 'new label' })
-
- expect(response).to have_gitlab_http_status(200)
-
- expect(project.reload.external_authorization_classification_label).to eq('new label')
- end
- end
end
describe 'POST /projects/:id/archive' do