Check exact array contents instead of inclusion
We're using `eq` and `match_array` in most places, but there were a few places where we were still checking each element is included in the array. This is a bit dangerous, because the array could have duplicate elements, and we wouldn't detect them with `include`.
This commit is contained in:
@@ -51,7 +51,7 @@ describe Milestone do
|
||||
published_in_application_time_zone = create(:milestone,
|
||||
publication_date: Date.current)
|
||||
|
||||
expect(Milestone.published).to include(published_in_application_time_zone)
|
||||
expect(Milestone.published).to eq [published_in_application_time_zone]
|
||||
expect(Milestone.published).not_to include(published_in_local_time_zone)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user