diff --git a/spec/factories/sales_log.rb b/spec/factories/sales_log.rb index 945b58201..c269d82e7 100644 --- a/spec/factories/sales_log.rb +++ b/spec/factories/sales_log.rb @@ -40,6 +40,7 @@ FactoryBot.define do hholdcount { "1" } wheel { 1 } details_known_1 { 1 } + relat3 { "P" } age3_known { 0 } age3 { 40 } details_known_2 { 1 } diff --git a/spec/models/form/sales/pages/person1_known_spec.rb b/spec/models/form/sales/pages/person1_known_spec.rb index 9353b82aa..3e3969bc6 100644 --- a/spec/models/form/sales/pages/person1_known_spec.rb +++ b/spec/models/form/sales/pages/person1_known_spec.rb @@ -24,7 +24,7 @@ RSpec.describe Form::Sales::Pages::Person1Known, type: :model do end it "has the correct header_partial" do - expect(page.header_partial).to eq("person_1_known_page") + expect(page.header_partial).to eq(nil) end it "has the correct description" do diff --git a/spec/models/form/sales/pages/person2_known_spec.rb b/spec/models/form/sales/pages/person2_known_spec.rb index 46ab592de..57bac950f 100644 --- a/spec/models/form/sales/pages/person2_known_spec.rb +++ b/spec/models/form/sales/pages/person2_known_spec.rb @@ -34,9 +34,9 @@ RSpec.describe Form::Sales::Pages::Person2Known, type: :model do it "has correct depends_on" do expect(page.depends_on).to eq( [ - { "hholdcount" => 2, "details_known_1" => 1 }, - { "hholdcount" => 3, "details_known_1" => 1 }, - { "hholdcount" => 4, "details_known_1" => 1 }, + { "hholdcount" => 2 }, + { "hholdcount" => 3 }, + { "hholdcount" => 4 }, ], ) end diff --git a/spec/models/form/sales/pages/person3_known_spec.rb b/spec/models/form/sales/pages/person3_known_spec.rb index ef4c1c34d..e05b8b452 100644 --- a/spec/models/form/sales/pages/person3_known_spec.rb +++ b/spec/models/form/sales/pages/person3_known_spec.rb @@ -34,8 +34,8 @@ RSpec.describe Form::Sales::Pages::Person3Known, type: :model do it "has correct depends_on" do expect(page.depends_on).to eq( [ - { "details_known_2" => 1, "hholdcount" => 3 }, - { "details_known_2" => 1, "hholdcount" => 4 }, + { "hholdcount" => 3 }, + { "hholdcount" => 4 }, ], ) end diff --git a/spec/models/form/sales/pages/person4_known_spec.rb b/spec/models/form/sales/pages/person4_known_spec.rb index 024c121c9..fdf8ad7d5 100644 --- a/spec/models/form/sales/pages/person4_known_spec.rb +++ b/spec/models/form/sales/pages/person4_known_spec.rb @@ -34,7 +34,7 @@ RSpec.describe Form::Sales::Pages::Person4Known, type: :model do it "has correct depends_on" do expect(page.depends_on).to eq( [ - { "details_known_3" => 1, "hholdcount" => 4 }, + { "hholdcount" => 4 }, ], ) end diff --git a/spec/models/form/sales/questions/person1_gender_identity_spec.rb b/spec/models/form/sales/questions/person1_gender_identity_spec.rb index 41adde38a..47370ce53 100644 --- a/spec/models/form/sales/questions/person1_gender_identity_spec.rb +++ b/spec/models/form/sales/questions/person1_gender_identity_spec.rb @@ -32,7 +32,7 @@ RSpec.describe Form::Sales::Questions::Person1GenderIdentity, type: :model do end it "has expected check answers card number" do - expect(question.check_answers_card_number).to eq(2) + expect(question.check_answers_card_number).to eq(3) end it "has the correct answer_options" do diff --git a/spec/models/form/sales/subsections/household_characteristics_spec.rb b/spec/models/form/sales/subsections/household_characteristics_spec.rb index 63c27291f..9fbf2fbfb 100644 --- a/spec/models/form/sales/subsections/household_characteristics_spec.rb +++ b/spec/models/form/sales/subsections/household_characteristics_spec.rb @@ -34,6 +34,8 @@ RSpec.describe Form::Sales::Subsections::HouseholdCharacteristics, type: :model buyer_2_live_in_property number_of_others_in_property person_1_known + person_1_relationship_to_buyer_1 + person_1_relationship_to_buyer_1_joint_purchase person_1_age person_1_gender_identity person_1_gender_identity_joint_purchase diff --git a/spec/models/form_handler_spec.rb b/spec/models/form_handler_spec.rb index c328d6ad0..0f1cdc5da 100644 --- a/spec/models/form_handler_spec.rb +++ b/spec/models/form_handler_spec.rb @@ -52,14 +52,14 @@ RSpec.describe FormHandler do it "is able to load a current sales form" do form = form_handler.get_form("current_sales") expect(form).to be_a(Form) - expect(form.pages.count).to eq(51) + expect(form.pages.count).to eq(53) expect(form.name).to eq("2022_2023_sales") end it "is able to load a previous sales form" do form = form_handler.get_form("previous_sales") expect(form).to be_a(Form) - expect(form.pages.count).to eq(51) + expect(form.pages.count).to eq(53) expect(form.name).to eq("2021_2022_sales") end end