Skip to content

Refactor merge requests/issues API specs

Eugenia Grieff requested to merge 200018-refactor-api-merge-reques-specsts into master

What does this MR do?

#200018 (closed)

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

Availability and Testing

Closes #200018 (closed)

Edited by Eugenia Grieff

Merge request reports