diff --git a/db/schema.rb b/db/schema.rb index 9b5b66837..5f86d013b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -235,6 +235,7 @@ ActiveRecord::Schema[7.0].define(version: 2022_09_27_133123) do t.bigint "location_id" t.integer "major_repairs_date_value_check" t.integer "void_date_value_check" + t.integer "housingneeds_type" t.integer "housingneeds_other" t.index ["created_by_id"], name: "index_lettings_logs_on_created_by_id" t.index ["location_id"], name: "index_lettings_logs_on_location_id" diff --git a/spec/factories/sales_log.rb b/spec/factories/sales_log.rb index 035c981b1..7458ecb74 100644 --- a/spec/factories/sales_log.rb +++ b/spec/factories/sales_log.rb @@ -16,6 +16,7 @@ FactoryBot.define do ownershipsch { 2 } type { 8 } saledate { Time.utc(2022, 2, 2, 10, 36, 49) } + companybuy { 1 } jointpur { 1 } beds { 2 } jointmore { 1 } diff --git a/spec/models/form/sales/subsections/setup_spec.rb b/spec/models/form/sales/subsections/setup_spec.rb index 054b45249..e2285afca 100644 --- a/spec/models/form/sales/subsections/setup_spec.rb +++ b/spec/models/form/sales/subsections/setup_spec.rb @@ -13,7 +13,7 @@ RSpec.describe Form::Sales::Subsections::Setup, type: :model do it "has correct pages" do expect(setup.pages.map(&:id)).to eq( - %w[organisation created_by completion_date purchaser_code ownership_scheme shared_ownership_type discounted_ownership_type outright_ownership_type buyer_live joint_purchase number_joint_buyers], + %w[organisation created_by completion_date purchaser_code ownership_scheme shared_ownership_type discounted_ownership_type outright_ownership_type buyer_live joint_purchase buyer_company number_joint_buyers], ) end diff --git a/spec/models/form_spec.rb b/spec/models/form_spec.rb index a55c404d7..c4da6ecf4 100644 --- a/spec/models/form_spec.rb +++ b/spec/models/form_spec.rb @@ -218,9 +218,9 @@ RSpec.describe Form, type: :model do expect(form.sections[0].class).to eq(Form::Sales::Sections::Setup) expect(form.subsections.count).to eq(1) expect(form.subsections.first.id).to eq("setup") - expect(form.pages.count).to eq(11) + expect(form.pages.count).to eq(12) expect(form.pages.first.id).to eq("organisation") - expect(form.questions.count).to eq(12) + expect(form.questions.count).to eq(13) expect(form.questions.first.id).to eq("owning_organisation_id") expect(form.start_date).to eq(Time.zone.parse("2022-04-01")) expect(form.end_date).to eq(Time.zone.parse("2023-07-01"))