summaryrefslogtreecommitdiff
path: root/spec/requests
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-03-26 16:20:32 +0000
committerNick Thomas <nick@gitlab.com>2019-03-26 16:20:32 +0000
commit8947103ff62f96708ff08eea48cbb6a8a249e398 (patch)
treeea2a4866c4efd2159cda887c13228b3076836b53 /spec/requests
parent6ac86054edb96e6ad0fee55452df21d133042db8 (diff)
parentac64e450114c403117869128eb88698900b7bf46 (diff)
downloadgitlab-ce-8947103ff62f96708ff08eea48cbb6a8a249e398.tar.gz
Merge branch 'fix-hidden-statistics' into 'master'
Show statistics also when repository is disabled Closes #59390 See merge request gitlab-org/gitlab-ce!26509
Diffstat (limited to 'spec/requests')
-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