Using rails time zone account invoice job specs

This commit is contained in:
Rob Harrington
2015-10-28 16:51:18 +11:00
parent cb1f79f59a
commit 02423d3a41
3 changed files with 6 additions and 6 deletions

View File

@@ -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 }

View File

@@ -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 }

View File

@@ -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') }