Skip to content

Rails5: fix deployment model spec

What does this MR do?

The last_for_environment calls find which changed in Rails 5 to return the results in the order the ids were passed. This doesn't match the expect in the current specs. Since the last_for_environment is only used here: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/7341/diffs#95ad36492c4b12bef5e4f601cc29c6e768f5d99b_0_48 with index_by, the order also doesn't matter so a simple fix is to use match_array.

Fixes spec/models/deployment_spec.rb:56 see https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/109020299.

What are the relevant issue numbers?

Does this MR meet the acceptance criteria?

Merge request reports

Loading