mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-13 23:37:47 +00:00
Using rails time zone account invoice job specs
This commit is contained in:
@@ -10,7 +10,7 @@ describe FinalizeAccountInvoices do
|
||||
|
||||
describe "unit specs" do
|
||||
let!(:finalizer) { FinalizeAccountInvoices.new }
|
||||
let!(:start_of_july) { Time.local(year, 7) }
|
||||
let!(:start_of_july) { Time.zone.local(year, 7) }
|
||||
|
||||
describe "perform" do
|
||||
let!(:accounts_distributor) { create(:distributor_enterprise) }
|
||||
@@ -164,7 +164,7 @@ describe FinalizeAccountInvoices do
|
||||
end
|
||||
|
||||
describe "validation spec" do
|
||||
let!(:start_of_july) { Time.local(year, 7) }
|
||||
let!(:start_of_july) { Time.zone.local(year, 7) }
|
||||
|
||||
let!(:updater) { UpdateAccountInvoices.new }
|
||||
let!(:finalizer) { FinalizeAccountInvoices.new }
|
||||
|
||||
@@ -8,7 +8,7 @@ describe UpdateAccountInvoices do
|
||||
let(:year) { Time.zone.now.year }
|
||||
|
||||
describe "units specs" do
|
||||
let!(:start_of_july) { Time.local(year, 7) }
|
||||
let!(:start_of_july) { Time.zone.local(year, 7) }
|
||||
|
||||
let!(:updater) { UpdateAccountInvoices.new }
|
||||
|
||||
@@ -321,7 +321,7 @@ describe UpdateAccountInvoices do
|
||||
end
|
||||
|
||||
describe "validation spec" do
|
||||
let!(:start_of_july) { Time.local(year, 7) }
|
||||
let!(:start_of_july) { Time.zone.local(year, 7) }
|
||||
|
||||
let!(:updater) { UpdateAccountInvoices.new }
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ describe UpdateBillablePeriods do
|
||||
let!(:year) { Time.zone.now.year }
|
||||
|
||||
describe "unit specs" do
|
||||
let!(:start_of_july) { Time.local(year, 7) }
|
||||
let!(:start_of_july) { Time.zone.local(year, 7) }
|
||||
|
||||
let!(:updater) { UpdateBillablePeriods.new }
|
||||
|
||||
@@ -551,7 +551,7 @@ describe UpdateBillablePeriods do
|
||||
describe "validation spec" do
|
||||
# Chose july to test with because June has 30 days and so is easy to calculate end date for shop trial
|
||||
let!(:year) { Time.zone.now.year }
|
||||
let!(:start_of_july) { Time.local(year, 7) }
|
||||
let!(:start_of_july) { Time.zone.local(year, 7) }
|
||||
|
||||
let!(:enterprise) { create(:supplier_enterprise, sells: 'any') }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user