Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2019-04-05 16:02:56 +0300
committerAndreas Brandl <abrandl@gitlab.com>2019-04-05 16:02:56 +0300
commit46b1b9c1d61c269588bd3cd4203420608ddd7f0b (patch)
treea877f5366d3367e1264e96f3f5e8a4b23bdbd62a /spec/controllers/concerns
parent7a48a06cf3b454021aa466464686fee8c82d6862 (diff)
Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"
This reverts merge request !26823
Diffstat (limited to 'spec/controllers/concerns')
-rw-r--r--spec/controllers/concerns/project_unauthorized_spec.rb51
1 files changed, 0 insertions, 51 deletions
diff --git a/spec/controllers/concerns/project_unauthorized_spec.rb b/spec/controllers/concerns/project_unauthorized_spec.rb
deleted file mode 100644
index 90b59b027cf..00000000000
--- a/spec/controllers/concerns/project_unauthorized_spec.rb
+++ /dev/null
@@ -1,51 +0,0 @@
-require 'spec_helper'
-
-describe ProjectUnauthorized do
- include ExternalAuthorizationServiceHelpers
- let(:user) { create(:user) }
-
- before do
- sign_in user
- end
-
- render_views
-
- describe '#project_unauthorized_proc' do
- controller(::Projects::ApplicationController) do
- def show
- head :ok
- end
- end
-
- let(:project) { create(:project) }
-
- before do
- project.add_developer(user)
- end
-
- it 'renders a 200 when the service allows access to the project' do
- external_service_allow_access(user, project)
-
- get :show, params: { namespace_id: project.namespace.to_param, id: project.to_param }
-
- expect(response).to have_gitlab_http_status(200)
- end
-
- it 'renders a 403 when the service denies access to the project' do
- external_service_deny_access(user, project)
-
- get :show, params: { namespace_id: project.namespace.to_param, id: project.to_param }
-
- expect(response).to have_gitlab_http_status(403)
- expect(response.body).to match("External authorization denied access to this project")
- end
-
- it 'renders a 404 when the user cannot see the project at all' do
- other_project = create(:project, :private)
-
- get :show, params: { namespace_id: other_project.namespace.to_param, id: other_project.to_param }
-
- expect(response).to have_gitlab_http_status(404)
- end
- end
-end