diff options
author | Rémy Coutable <remy@rymai.me> | 2017-05-04 07:16:08 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-05-04 07:16:08 +0000 |
commit | 12c34c1cbbaeb107b826a52b784e0dc10f5a53ba (patch) | |
tree | f66400f63ea3c4664fb3c0cac449fbb692d083ef /spec/requests | |
parent | 0f976727c4325e7837a051ae98dbe4215b12f6e0 (diff) | |
parent | 21f5515a5ffb46bb2e710c17690122903bca126e (diff) | |
download | gitlab-ce-12c34c1cbbaeb107b826a52b784e0dc10f5a53ba.tar.gz |
Merge branch '31544-size-of-project-from-api' into 'master'
Resolve "Size of project from API"
Closes #31544
See merge request !11013
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/projects_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/requests/api/projects_spec.rb b/spec/requests/api/projects_spec.rb index cc03d7a933b..ab70ce5cd2f 100644 --- a/spec/requests/api/projects_spec.rb +++ b/spec/requests/api/projects_spec.rb @@ -665,6 +665,20 @@ describe API::Projects do }) end + it "does not include statistics by default" do + get api("/projects/#{project.id}", user) + + expect(response).to have_http_status(200) + expect(json_response).not_to include 'statistics' + end + + it "includes statistics if requested" do + get api("/projects/#{project.id}", user), statistics: true + + expect(response).to have_http_status(200) + expect(json_response).to include 'statistics' + end + describe 'permissions' do context 'all projects' do before { project.team << [user, :master] } |