Commit 48daf871 authored by Patrick Bajao's avatar Patrick Bajao

Fix flaky MergeRequests::HandleAssigneesChangeWorker spec

It is possible that the expected array and the actual array or
relation are different in order. That can lead to flakiness.

To fix it, `match_array` is used to ignore the order of records.
parent bda86133
......@@ -20,7 +20,7 @@ RSpec.describe MergeRequests::HandleAssigneesChangeWorker do
describe '#perform' do
it 'calls MergeRequests::HandleAssigneesChangeService#execute to handle the changes' do
expect_next(::MergeRequests::HandleAssigneesChangeService)
.to receive(:execute).with(merge_request, old_assignees, options)
.to receive(:execute).with(merge_request, match_array(old_assignees), options)
worker.perform(merge_request.id, user.id, user_ids, options)
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment