summaryrefslogtreecommitdiff
path: root/spec/requests/api/projects_spec.rb
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2019-03-23 00:44:35 +0100
committerPeter Marko <peter.marko@siemens.com>2019-03-23 12:06:50 +0100
commit12adb2a4bcca8b8ea07be2b9d120404e8a14a4be (patch)
tree615c38d321a86770930958c60c0b67592b8622e6 /spec/requests/api/projects_spec.rb
parent09d25b04c34398f9f825b3cc95265af3097fa035 (diff)
downloadgitlab-ce-12adb2a4bcca8b8ea07be2b9d120404e8a14a4be.tar.gz
Show statistics also when repository is disabled
Diffstat (limited to 'spec/requests/api/projects_spec.rb')
-rw-r--r--spec/requests/api/projects_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb
index 60d9d7fed13..4c3c088b307 100644
--- a/spec/requests/api/projects_spec.rb
+++ b/spec/requests/api/projects_spec.rb
@@ -1183,6 +1183,16 @@ describe API::Projects do
expect(response).to have_gitlab_http_status(200)
expect(json_response).to include 'statistics'
end
+
+ it "includes statistics also when repository is disabled" do
+ project.add_developer(user)
+ project.project_feature.update_attribute(:repository_access_level, ProjectFeature::DISABLED)
+
+ get api("/projects/#{project.id}", user), params: { statistics: true }
+
+ expect(response).to have_gitlab_http_status(200)
+ expect(json_response).to include 'statistics'
+ end
end
it "includes import_error if user can admin project" do