Browse Source

Add a 2023 context

pull/2256/head
Kat 2 years ago
parent
commit
c20a0e1e90
  1. 14
      spec/models/validations/household_validations_spec.rb

14
spec/models/validations/household_validations_spec.rb

@ -385,6 +385,19 @@ RSpec.describe Validations::HouseholdValidations do
end end
describe "#validate_person_age_matches_economic_status" do describe "#validate_person_age_matches_economic_status" do
context "with 2023 logs" do
let(:log_date) { Time.zone.local(2023, 4, 1) }
before do
Timecop.freeze(log_date)
Singleton.__init__(FormHandler)
end
after do
Timecop.return
Singleton.__init__(FormHandler)
end
context "when the household contains a person under 16" do context "when the household contains a person under 16" do
it "validates that person's economic status must be Child" do it "validates that person's economic status must be Child" do
record.age2 = 14 record.age2 = 14
@ -415,6 +428,7 @@ RSpec.describe Validations::HouseholdValidations do
.to include(match I18n.t("validations.household.age.child_over_16", person_num: 2)) .to include(match I18n.t("validations.household.age.child_over_16", person_num: 2))
end end
end end
end
context "with 2024 logs" do context "with 2024 logs" do
before do before do

Loading…
Cancel
Save