diff options
Diffstat (limited to 'spec/requests/api/issues/issues_spec.rb')
-rw-r--r-- | spec/requests/api/issues/issues_spec.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/spec/requests/api/issues/issues_spec.rb b/spec/requests/api/issues/issues_spec.rb index 09e005398a9..19422d4ca39 100644 --- a/spec/requests/api/issues/issues_spec.rb +++ b/spec/requests/api/issues/issues_spec.rb @@ -795,13 +795,13 @@ describe API::Issues do it 'returns issues from non archived projects only by default' do get api("/groups/#{group1.id}/issues", user), params: { scope: 'all' } - expect_response_contain_exactly(issue2, issue1) + expect_paginated_array_response([issue2.id, issue1.id]) end it 'returns issues from archived and non archived projects when non_archived is false' do get api("/groups/#{group1.id}/issues", user), params: { non_archived: false, scope: 'all' } - expect_response_contain_exactly(issue1, issue2, issue3) + expect_paginated_array_response([issue3.id, issue2.id, issue1.id]) end end end @@ -888,9 +888,4 @@ describe API::Issues do include_examples 'time tracking endpoints', 'issue' end - - def expect_response_contain_exactly(*items) - expect(json_response.length).to eq(items.size) - expect(json_response.map { |element| element['id'] }).to contain_exactly(*items.map(&:id)) - end end |