From d8ac963d8307e0e2a07dc76920fc38ee0d5e497f Mon Sep 17 00:00:00 2001 From: Kat Date: Thu, 22 Jun 2023 16:26:59 +0100 Subject: [PATCH] Update some test wording --- spec/models/validations/sales/setup_validations_spec.rb | 6 +++--- spec/models/validations/setup_validations_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/models/validations/sales/setup_validations_spec.rb b/spec/models/validations/sales/setup_validations_spec.rb index fdaa78752..795eb13b6 100644 --- a/spec/models/validations/sales/setup_validations_spec.rb +++ b/spec/models/validations/sales/setup_validations_spec.rb @@ -106,7 +106,7 @@ RSpec.describe Validations::Sales::SetupValidations do end end - context "when after the new logs end date but before edit end date for the previous period" do + context "when current time is after the new logs end date but before edit end date for the previous period" do let(:record) { build(:sales_log, saledate: Time.zone.local(2025, 4, 1)) } before do @@ -120,7 +120,7 @@ RSpec.describe Validations::Sales::SetupValidations do expect(record.errors["saledate"]).to include(match "Enter a date within the 24/25 collection year, which is between 1st April 2024 and 31st March 2025") end - it "can edit already created logs logs for the previous collection year" do + it "can edit already created logs for the previous collection year" do record.saledate = Time.zone.local(2024, 1, 2) record.save!(validate: false) record.saledate = Time.zone.local(2024, 1, 1) @@ -143,7 +143,7 @@ RSpec.describe Validations::Sales::SetupValidations do expect(record.errors["saledate"]).to include(match "Enter a date within the 24/25 collection year, which is between 1st April 2024 and 31st March 2025") end - it "cannot edit already created logs logs for the previous collection year" do + it "cannot edit already created logs for the previous collection year" do record.saledate = Time.zone.local(2024, 1, 2) record.save!(validate: false) record.saledate = Time.zone.local(2024, 1, 1) diff --git a/spec/models/validations/setup_validations_spec.rb b/spec/models/validations/setup_validations_spec.rb index e329be9b7..dba0ac3b7 100644 --- a/spec/models/validations/setup_validations_spec.rb +++ b/spec/models/validations/setup_validations_spec.rb @@ -98,7 +98,7 @@ RSpec.describe Validations::SetupValidations do expect(record.errors["startdate"]).to include(match "Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024") end - it "can edit already created logs logs for the previous collection year" do + it "can edit already created logs for the previous collection year" do record.startdate = Time.zone.local(2023, 1, 2) record.save!(validate: false) record.startdate = Time.zone.local(2023, 1, 1) @@ -119,7 +119,7 @@ RSpec.describe Validations::SetupValidations do expect(record.errors["startdate"]).to include(match "Enter a date within the 23/24 collection year, which is between 1st April 2023 and 31st March 2024") end - it "cannot edit already created logs logs for the previous collection year" do + it "cannot edit already created logs for the previous collection year" do record.startdate = Time.zone.local(2023, 1, 2) record.save!(validate: false) record.startdate = Time.zone.local(2023, 1, 1)