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:
@@ -59,7 +59,7 @@ describe LocalCensusRecord do
|
||||
|
||||
context "search" do
|
||||
it "filter document_numbers by given terms" do
|
||||
expect(LocalCensusRecord.search("A")).to include a_local_census_record
|
||||
expect(LocalCensusRecord.search("A")).to eq [a_local_census_record]
|
||||
expect(LocalCensusRecord.search("A")).not_to include b_local_census_record
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user