diff --git a/db/schema.rb b/db/schema.rb index 679b582c1..09d83a841 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -524,8 +524,8 @@ ActiveRecord::Schema[7.0].define(version: 2023_02_10_122037) do t.integer "details_known_5" t.integer "details_known_6" t.integer "saledate_check" - t.integer "staircasesale" t.integer "prevshared" + t.integer "staircasesale" t.index ["bulk_upload_id"], name: "index_sales_logs_on_bulk_upload_id" t.index ["created_by_id"], name: "index_sales_logs_on_created_by_id" t.index ["owning_organisation_id"], name: "index_sales_logs_on_owning_organisation_id" diff --git a/spec/models/validations/date_validations_spec.rb b/spec/models/validations/date_validations_spec.rb index 20d1e094c..f84ad365f 100644 --- a/spec/models/validations/date_validations_spec.rb +++ b/spec/models/validations/date_validations_spec.rb @@ -12,13 +12,13 @@ RSpec.describe Validations::DateValidations do it "cannot be before the first collection window start date" do record.startdate = Time.zone.local(2020, 1, 1) date_validator.validate_startdate(record) - expect(record.errors["startdate"]).to include(match I18n.t("validations.date.outside_collection_window")) + expect(record.errors["startdate"]).to include(match I18n.t("validations.date.outside_collection_window.crossover_period", previous_collection: "21/22", current_collection: "22/23", previous_collection_start_year: "2021", current_collection_end_year: "2023")) end it "cannot be after the second collection window end date" do record.startdate = Time.zone.local(2023, 7, 1, 6) date_validator.validate_startdate(record) - expect(record.errors["startdate"]).to include(match I18n.t("validations.date.outside_collection_window")) + expect(record.errors["startdate"]).to include(match I18n.t("validations.date.outside_collection_window.crossover_period", previous_collection: "21/22", current_collection: "22/23", previous_collection_start_year: "2021", current_collection_end_year: "2023")) end it "must be a valid date" do