Browse Source

Add don't know options

pull/1356/head
Kat 3 years ago
parent
commit
eb8dec653e
  1. 5
      app/models/form/sales/questions/buyer1_mortgage.rb
  2. 5
      app/models/form/sales/questions/buyer1_previous_tenure.rb
  3. 5
      app/models/form/sales/questions/buyer2_mortgage.rb
  4. 5
      spec/models/form/sales/questions/buyer1_mortgage_spec.rb
  5. 5
      spec/models/form/sales/questions/buyer1_previous_tenure_spec.rb
  6. 5
      spec/models/form/sales/questions/buyer2_mortgage_spec.rb

5
app/models/form/sales/questions/buyer1_mortgage.rb

@ -2,8 +2,8 @@ class Form::Sales::Questions::Buyer1Mortgage < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "inc1mort" @id = "inc1mort"
@check_answer_label = "Buyer 1's income used for mortgage application" @check_answer_label = "Buyer 1s income used for mortgage application"
@header = "Was buyer 1's income used for a mortgage application?" @header = "Was buyer 1s income used for a mortgage application?"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 1 @check_answers_card_number = 1
@ -12,5 +12,6 @@ class Form::Sales::Questions::Buyer1Mortgage < ::Form::Question
ANSWER_OPTIONS = { ANSWER_OPTIONS = {
"1" => { "value" => "Yes" }, "1" => { "value" => "Yes" },
"2" => { "value" => "No" }, "2" => { "value" => "No" },
"3" => { "value" => "Don’t know" },
}.freeze }.freeze
end end

5
app/models/form/sales/questions/buyer1_previous_tenure.rb

@ -2,8 +2,8 @@ class Form::Sales::Questions::Buyer1PreviousTenure < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "prevten" @id = "prevten"
@check_answer_label = "Buyer 1's previous tenure" @check_answer_label = "Buyer 1s previous tenure"
@header = "What was buyer 1's previous tenure?" @header = "What was buyer 1s previous tenure?"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
end end
@ -17,5 +17,6 @@ class Form::Sales::Questions::Buyer1PreviousTenure < ::Form::Question
"6" => { "value" => "Living with family or friends" }, "6" => { "value" => "Living with family or friends" },
"7" => { "value" => "Temporary accomodation" }, "7" => { "value" => "Temporary accomodation" },
"9" => { "value" => "Other" }, "9" => { "value" => "Other" },
"0" => { "value" => "Don’t know" },
}.freeze }.freeze
end end

5
app/models/form/sales/questions/buyer2_mortgage.rb

@ -2,8 +2,8 @@ class Form::Sales::Questions::Buyer2Mortgage < ::Form::Question
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "inc2mort" @id = "inc2mort"
@check_answer_label = "Buyer 2's income used for mortgage application" @check_answer_label = "Buyer 2s income used for mortgage application"
@header = "Was buyer 2's income used for a mortgage application?" @header = "Was buyer 2s income used for a mortgage application?"
@type = "radio" @type = "radio"
@answer_options = ANSWER_OPTIONS @answer_options = ANSWER_OPTIONS
@check_answers_card_number = 2 @check_answers_card_number = 2
@ -12,5 +12,6 @@ class Form::Sales::Questions::Buyer2Mortgage < ::Form::Question
ANSWER_OPTIONS = { ANSWER_OPTIONS = {
"1" => { "value" => "Yes" }, "1" => { "value" => "Yes" },
"2" => { "value" => "No" }, "2" => { "value" => "No" },
"3" => { "value" => "Don’t know" },
}.freeze }.freeze
end end

5
spec/models/form/sales/questions/buyer1_mortgage_spec.rb

@ -16,11 +16,11 @@ RSpec.describe Form::Sales::Questions::Buyer1Mortgage, type: :model do
end end
it "has the correct header" do it "has the correct header" do
expect(question.header).to eq("Was buyer 1's income used for a mortgage application?") expect(question.header).to eq("Was buyer 1s income used for a mortgage application?")
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("Buyer 1's income used for mortgage application") expect(question.check_answer_label).to eq("Buyer 1s income used for mortgage application")
end end
it "has the correct type" do it "has the correct type" do
@ -35,6 +35,7 @@ RSpec.describe Form::Sales::Questions::Buyer1Mortgage, type: :model do
expect(question.answer_options).to eq({ expect(question.answer_options).to eq({
"1" => { "value" => "Yes" }, "1" => { "value" => "Yes" },
"2" => { "value" => "No" }, "2" => { "value" => "No" },
"3" => { "value" => "Don’t know" },
}) })
end end

5
spec/models/form/sales/questions/buyer1_previous_tenure_spec.rb

@ -16,11 +16,11 @@ RSpec.describe Form::Sales::Questions::Buyer1PreviousTenure, type: :model do
end end
it "has the correct header" do it "has the correct header" do
expect(question.header).to eq("What was buyer 1's previous tenure?") expect(question.header).to eq("What was buyer 1s previous tenure?")
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("Buyer 1's previous tenure") expect(question.check_answer_label).to eq("Buyer 1s previous tenure")
end end
it "has the correct type" do it "has the correct type" do
@ -41,6 +41,7 @@ RSpec.describe Form::Sales::Questions::Buyer1PreviousTenure, type: :model do
"6" => { "value" => "Living with family or friends" }, "6" => { "value" => "Living with family or friends" },
"7" => { "value" => "Temporary accomodation" }, "7" => { "value" => "Temporary accomodation" },
"9" => { "value" => "Other" }, "9" => { "value" => "Other" },
"0" => { "value" => "Don’t know" },
}) })
end end
end end

5
spec/models/form/sales/questions/buyer2_mortgage_spec.rb

@ -16,11 +16,11 @@ RSpec.describe Form::Sales::Questions::Buyer2Mortgage, type: :model do
end end
it "has the correct header" do it "has the correct header" do
expect(question.header).to eq("Was buyer 2's income used for a mortgage application?") expect(question.header).to eq("Was buyer 2s income used for a mortgage application?")
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("Buyer 2's income used for mortgage application") expect(question.check_answer_label).to eq("Buyer 2s income used for mortgage application")
end end
it "has the correct type" do it "has the correct type" do
@ -35,6 +35,7 @@ RSpec.describe Form::Sales::Questions::Buyer2Mortgage, type: :model do
expect(question.answer_options).to eq({ expect(question.answer_options).to eq({
"1" => { "value" => "Yes" }, "1" => { "value" => "Yes" },
"2" => { "value" => "No" }, "2" => { "value" => "No" },
"3" => { "value" => "Don’t know" },
}) })
end end

Loading…
Cancel
Save