Add spec for confirming correct values when scoped

This commit is contained in:
Joseph Johansen
2024-08-14 10:06:10 +01:00
committed by Konrad
parent 1621f97fdb
commit ce6ae04147

View File

@@ -434,6 +434,11 @@ RSpec.describe OrderCycle do
expect(OrderCycle.earliest_closing_times([e1.id])).not_to have_key e2.id
expect(OrderCycle.earliest_closing_times([e2.id])).not_to have_key e1.id
end
it "returns the correct values" do
expect(OrderCycle.earliest_closing_times([e1.id])[e1.id].round).to eq time1.round
expect(OrderCycle.earliest_closing_times([e2.id])[e2.id].round).to eq time2.round
end
end
context "when not scoped by distributors" do