Browse Source

tests: update tests

pull/1093/head
natdeanlewissoftwire 3 years ago
parent
commit
110f429597
  1. 4
      spec/factories/sales_log.rb
  2. 8
      spec/models/form/sales/subsections/household_characteristics_spec.rb
  3. 4
      spec/models/form_handler_spec.rb

4
spec/factories/sales_log.rb

@ -67,6 +67,10 @@ FactoryBot.define do
ecstat4 { 3 } ecstat4 { 3 }
ecstat5 { 2 } ecstat5 { 2 }
ecstat6 { 1 } ecstat6 { 1 }
relat3 { "P" }
relat4 { "P" }
relat5 { "P" }
relat6 { "P" }
end end
end end
end end

8
spec/models/form/sales/subsections/household_characteristics_spec.rb

@ -35,6 +35,8 @@ RSpec.describe Form::Sales::Subsections::HouseholdCharacteristics, type: :model
buyer_2_live_in_property buyer_2_live_in_property
number_of_others_in_property number_of_others_in_property
person_1_known person_1_known
person_1_relationship_to_buyer_1
person_1_relationship_to_buyer_1_joint_purchase
person_1_age person_1_age
person_1_age_joint_purchase person_1_age_joint_purchase
person_1_gender_identity person_1_gender_identity
@ -42,16 +44,22 @@ RSpec.describe Form::Sales::Subsections::HouseholdCharacteristics, type: :model
person_1_working_situation person_1_working_situation
person_1_working_situation_joint_purchase person_1_working_situation_joint_purchase
person_2_known person_2_known
person_2_relationship_to_buyer_1
person_2_relationship_to_buyer_1_joint_purchase
person_2_age person_2_age
person_2_age_joint_purchase person_2_age_joint_purchase
person_2_working_situation person_2_working_situation
person_2_working_situation_joint_purchase person_2_working_situation_joint_purchase
person_3_known person_3_known
person_3_relationship_to_buyer_1
person_3_relationship_to_buyer_1_joint_purchase
person_3_age person_3_age
person_3_age_joint_purchase person_3_age_joint_purchase
person_3_working_situation person_3_working_situation
person_3_working_situation_joint_purchase person_3_working_situation_joint_purchase
person_4_known person_4_known
person_4_relationship_to_buyer_1
person_4_relationship_to_buyer_1_joint_purchase
person_4_age person_4_age
person_4_age_joint_purchase person_4_age_joint_purchase
person_4_working_situation person_4_working_situation

4
spec/models/form_handler_spec.rb

@ -52,14 +52,14 @@ RSpec.describe FormHandler do
it "is able to load a current sales form" do it "is able to load a current sales form" do
form = form_handler.get_form("current_sales") form = form_handler.get_form("current_sales")
expect(form).to be_a(Form) expect(form).to be_a(Form)
expect(form.pages.count).to eq(68) expect(form.pages.count).to eq(76)
expect(form.name).to eq("2022_2023_sales") expect(form.name).to eq("2022_2023_sales")
end end
it "is able to load a previous sales form" do it "is able to load a previous sales form" do
form = form_handler.get_form("previous_sales") form = form_handler.get_form("previous_sales")
expect(form).to be_a(Form) expect(form).to be_a(Form)
expect(form.pages.count).to eq(68) expect(form.pages.count).to eq(76)
expect(form.name).to eq("2021_2022_sales") expect(form.name).to eq("2021_2022_sales")
end end
end end

Loading…
Cancel
Save