summaryrefslogtreecommitdiff
path: root/spec/requests/lfs_http_spec.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-10-17 17:23:51 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-11-01 09:37:20 +0100
commit517dd4a3f38ff36feadf5cacf88ce0fdd30be2fe (patch)
tree72e21251a4216068b0c7270935c18824f7db4495 /spec/requests/lfs_http_spec.rb
parentb328c7885532ccff70e1f9f7dc970a8dde0c52d6 (diff)
downloadgitlab-ce-517dd4a3f38ff36feadf5cacf88ce0fdd30be2fe.tar.gz
Allow owners to fetch source code in CI buildsallow-owner-to-run-ci-builds
Due to different way of handling owners of a project, they were not allowed to fetch CI sources for project.
Diffstat (limited to 'spec/requests/lfs_http_spec.rb')
-rw-r--r--spec/requests/lfs_http_spec.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/requests/lfs_http_spec.rb b/spec/requests/lfs_http_spec.rb
index dbdf83a0dff..9bfc84c7425 100644
--- a/spec/requests/lfs_http_spec.rb
+++ b/spec/requests/lfs_http_spec.rb
@@ -284,7 +284,17 @@ describe 'Git LFS API and storage' do
let(:authorization) { authorize_ci_project }
shared_examples 'can download LFS only from own projects' do
- context 'for own project' do
+ context 'for owned project' do
+ let(:project) { create(:empty_project, namespace: user.namespace) }
+
+ let(:update_permissions) do
+ project.lfs_objects << lfs_object
+ end
+
+ it_behaves_like 'responds with a file'
+ end
+
+ context 'for member of project' do
let(:pipeline) { create(:ci_empty_pipeline, project: project) }
let(:update_permissions) do