Browse Source

Update some test wording

pull/1716/head
Kat 2 years ago
parent
commit
d8ac963d83
  1. 6
      spec/models/validations/sales/setup_validations_spec.rb
  2. 4
      spec/models/validations/setup_validations_spec.rb

6
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)

4
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)

Loading…
Cancel
Save