mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
@@ -245,8 +245,12 @@ module Reporting
|
||||
o2 = create(:order, completed_at: 3.days.ago)
|
||||
o3 = create(:order, completed_at: 5.days.ago)
|
||||
|
||||
allow(subject).to receive(:params).and_return({ q: { completed_at_gt: 1.day.before(o2.completed_at),
|
||||
completed_at_lt: 1.day.after(o2.completed_at) } })
|
||||
allow(subject).to receive(:params).and_return(
|
||||
q: {
|
||||
completed_at_gt: 1.day.before(o2.completed_at),
|
||||
completed_at_lt: 1.day.after(o2.completed_at)
|
||||
}
|
||||
)
|
||||
expect(subject.filter(orders)).to eq([o2])
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user