diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-26 17:51:59 +0000 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-26 17:51:59 +0000 |
commit | bbd39021c39b66ecb954a7fb8276320556b65a3b (patch) | |
tree | 9b987cc89dd835ba4df2ba26cafbb4f7916b948d /spec | |
parent | a7f9a8447963e1f1b5f2439f6f75508879a8aea9 (diff) | |
parent | 440635015fbea129cbfd7b266589ea2a33dda471 (diff) | |
download | gitlab-ce-bbd39021c39b66ecb954a7fb8276320556b65a3b.tar.gz |
Merge branch 'sh-fix-nplusone-issues' into 'master'
Fix N+1 Gitaly calls in /api/v4/projects/:id/issues
See merge request gitlab-org/gitlab-ce!32171
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/issues/get_project_issues_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/requests/api/issues/get_project_issues_spec.rb b/spec/requests/api/issues/get_project_issues_spec.rb index 521d6b88734..b7aa3f93451 100644 --- a/spec/requests/api/issues/get_project_issues_spec.rb +++ b/spec/requests/api/issues/get_project_issues_spec.rb @@ -446,6 +446,14 @@ describe API::Issues do expect_paginated_array_response([closed_issue.id, confidential_issue.id, issue.id]) end + it 'exposes known attributes' do + get api("#{base_url}/issues", user) + + expect(response).to have_gitlab_http_status(200) + expect(json_response.last.keys).to include(*%w(id iid project_id title description)) + expect(json_response.last).not_to have_key('subscribed') + end + context 'issues_statistics' do context 'no state is treated as all state' do let(:params) { {} } |