Skip to content

Commit a01fc0a

Browse files
committed
fix: flaky test
Fix attendees emails test which was trying to match two strings together when order can change and cause flakiness. Resolved by expecting string to include emails so order shouldn't matter
1 parent 03b0800 commit a01fc0a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/presenters/meeting_presenter_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
it '#attendees_emails' do
1818
attendees = Fabricate.times(4, :attending_meeting_invitation, meeting: meeting)
19-
20-
expect(event.attendees_emails).to eq(
21-
attendees.map(&:member).map(&:email).sort.join(', ')
22-
)
19+
emails = attendees.map(&:member).map(&:email)
20+
emails.each do |email|
21+
expect(event.attendees_emails).to include(email)
22+
end
2323
end
2424

2525
it '#time' do

0 commit comments

Comments
 (0)