mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Adds timer restriction with Timecop
The datet-time-picker test case was failing for me locally, but passing on GH-Actions. Controlling the time should prevent this type of flakyness
This commit is contained in:
@@ -13,6 +13,10 @@ RSpec.describe "Orders And Distributors" do
|
||||
let!(:distributor2) { create(:distributor_enterprise, name: "By Moto") }
|
||||
let!(:completed_at) { Time.zone.now.to_fs(:db) }
|
||||
|
||||
around do |example|
|
||||
Timecop.travel(completed_at) { example.run }
|
||||
end
|
||||
|
||||
let!(:order) {
|
||||
create(:order_ready_to_ship, distributor_id: distributor.id, completed_at:)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user