Commit a8ef0845 authored by Albert Salim's avatar Albert Salim

Fix flaky order-dependent assertions

parent d1ee8c6b
......@@ -38,8 +38,8 @@ RSpec.describe MergeRequests::SyncCodeOwnerApprovalRules do
rb_rule = merge_request.approval_rules.code_owner.find_by(name: rb_entry.pattern)
doc_rule = merge_request.approval_rules.code_owner.find_by(name: doc_entry.pattern)
expect(rb_rule.users).to eq(rb_owners)
expect(doc_rule.users).to eq(doc_owners)
expect(rb_rule.users).to match_array(rb_owners)
expect(doc_rule.users).to match_array(doc_owners)
expect(rb_rule.groups).to match_array(rb_group_owners)
expect(doc_rule.groups).to match_array(doc_group_owners)
......@@ -62,7 +62,7 @@ RSpec.describe MergeRequests::SyncCodeOwnerApprovalRules do
service.execute
expect(other_rule.reload.users).to eq(rb_owners)
expect(other_rule.reload.users).to match_array(rb_owners)
expect(other_rule.reload.groups).to match_array(rb_group_owners)
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