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:
@@ -114,9 +114,7 @@ describe Legislation::Process do
|
||||
it "filters past" do
|
||||
past_processes = ::Legislation::Process.past
|
||||
|
||||
expect(past_processes).to include(process_3)
|
||||
expect(past_processes).not_to include(process_2)
|
||||
expect(past_processes).not_to include(process_1)
|
||||
expect(past_processes).to eq [process_3]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user