mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-17 04:34:24 +00:00
Test customer report filtering without sorting
The report doesn't seem to sort. So the specs don't expect that either now. These specs were flaky before, depending on the random order in the database query result.
This commit is contained in:
@@ -266,7 +266,7 @@ module Reporting
|
||||
completed_at_lt: 1.day.after(o2.completed_at)
|
||||
}
|
||||
)
|
||||
expect(subject.filter(orders)).to eq([o2, o3])
|
||||
expect(subject.filter(orders)).to match_array [o2, o3]
|
||||
end
|
||||
|
||||
it "when completed_at_lt param is missing" do
|
||||
@@ -276,7 +276,7 @@ module Reporting
|
||||
completed_at_lt: ""
|
||||
}
|
||||
)
|
||||
expect(subject.filter(orders)).to eq([o1, o2])
|
||||
expect(subject.filter(orders)).to match_array [o1, o2]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user