Refactor merge requests/issues API specs
What does this MR do?
Follow-up to address discussion: !23785 (comment 280153356)
I see a few duplicate definitions for
expect_response_contain_exactly
which are doing basically the same thing, could we have a follow-up to send these to a API spec helper to reuse these?
Refactor merge requests/issues API specs to remove code duplication.
We used the method expect_response_contain_exactly
in ee/spec/requests/api/merge_requests_spec.rb
, spec/requests/api/issues/issues_spec.rb
and spec/requests/api/merge_requests_spec.rb
but this can be replaced by existing method expect_paginated_array_response
if we modify the parameters slighly.
Also, some lines in spec/requests/api/merge_requests_spec.rb
can be replaced by using the method expect_paginated_array_response
and expect_empty_array_response
.
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
Closes #200018 (closed)
Edited by Eugenia Grieff