summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-08 15:06:21 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-08 15:06:21 +0000
commit759bab058520a21d87087355dc193f634176e98a (patch)
treec26bdab0be782b6852e5f588dc5f1b056c2eec56 /spec/requests
parent61f0c58946ebac453b55a657cd4be1ac50a01e11 (diff)
downloadgitlab-ce-759bab058520a21d87087355dc193f634176e98a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/projects/blob_controller_spec.rb44
1 files changed, 0 insertions, 44 deletions
diff --git a/spec/requests/projects/blob_controller_spec.rb b/spec/requests/projects/blob_controller_spec.rb
deleted file mode 100644
index b3321375ccc..00000000000
--- a/spec/requests/projects/blob_controller_spec.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-describe Projects::BlobController do
- let(:project) { create(:project, :private, :repository) }
- let(:namespace) { project.namespace }
-
- context 'anonymous user views blob in inaccessible project' do
- context 'with default HTML format' do
- before do
- get namespace_project_blob_path(namespace_id: namespace, project_id: project, id: 'master/README.md')
- end
-
- context 'when project is private' do
- it { expect(response).to have_gitlab_http_status(:redirect) }
- end
-
- context 'when project does not exist' do
- let(:namespace) { 'non_existent_namespace' }
- let(:project) { 'non_existent_project' }
-
- it { expect(response).to have_gitlab_http_status(:redirect) }
- end
- end
-
- context 'with JSON format' do
- before do
- get namespace_project_blob_path(namespace_id: namespace, project_id: project, id: 'master/README.md', format: :json)
- end
-
- context 'when project is private' do
- it { expect(response).to have_gitlab_http_status(:unauthorized) }
- end
-
- context 'when project does not exist' do
- let(:namespace) { 'non_existent_namespace' }
- let(:project) { 'non_existent_project' }
-
- it { expect(response).to have_gitlab_http_status(:unauthorized) }
- end
- end
- end
-end