Browse Source

add type of building question to sales

pull/911/head
Ted-U 3 years ago committed by Jack S
parent
commit
92d59e71f6
  1. 2
      app/models/form/sales/questions/building_type.rb
  2. 2
      spec/models/form/sales/questions/building_type_spec.rb
  3. 16
      spec/models/form/sales/subsections/setup_spec.rb

2
app/models/form/sales/questions/building_type.rb

@ -2,7 +2,7 @@ class Form::Sales::Questions::BuildingType < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "builtype" @id = "builtype"
@check_answer_label = "Type of building" @check_answer_label = "Building type"
@header = "What type of building is the property?" @header = "What type of building is the property?"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS

2
spec/models/form/sales/questions/building_type_spec.rb

@ -20,7 +20,7 @@ RSpec.describe Form::Sales::Questions::BuildingType, type: :model do
end end
it "has the correct check_answer_label" do it "has the correct check_answer_label" do
expect(question.check_answer_label).to eq("Type of building") expect(question.check_answer_label).to eq("Building type")
end end
it "has the correct type" do it "has the correct type" do

16
spec/models/form/sales/subsections/setup_spec.rb

@ -13,7 +13,21 @@ RSpec.describe Form::Sales::Subsections::Setup, type: :model do
it "has correct pages" do it "has correct pages" do
expect(setup.pages.map(&:id)).to eq( 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_company buyer_live joint_purchase number_joint_buyers builtype], %w[
organisation
created_by
completion_date
purchaser_code
ownership_scheme
shared_ownership_type
discounted_ownership_type
outright_ownership_type
buyer_company
buyer_live
joint_purchase
number_joint_buyers
builtype
],
) )
end end

Loading…
Cancel
Save