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)
super
@id = "inc1mort"
@check_answer_label = "Buyer 1's income used for mortgage application"
@header = "Was buyer 1's income used for a mortgage application?"
@check_answer_label = "Buyer 1s income used for mortgage application"
@header = "Was buyer 1s income used for a mortgage application?"
@type = "radio"
@answer_options = ANSWER_OPTIONS
@check_answers_card_number = 1
@ -12,5 +12,6 @@ class Form::Sales::Questions::Buyer1Mortgage < ::Form::Question
ANSWER_OPTIONS = {
"1" => { "value" => "Yes" },
"2" => { "value" => "No" },
"3" => { "value" => "Don’t know" },
}.freeze
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)
super
@id = "prevten"
@check_answer_label = "Buyer 1's previous tenure"
@header = "What was buyer 1's previous tenure?"
@check_answer_label = "Buyer 1s previous tenure"
@header = "What was buyer 1s previous tenure?"
@type = "radio"
@answer_options = ANSWER_OPTIONS
end
@ -17,5 +17,6 @@ class Form::Sales::Questions::Buyer1PreviousTenure < ::Form::Question
"6" => { "value" => "Living with family or friends" },
"7" => { "value" => "Temporary accomodation" },
"9" => { "value" => "Other" },
"0" => { "value" => "Don’t know" },
}.freeze
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)
super
@id = "inc2mort"
@check_answer_label = "Buyer 2's income used for mortgage application"
@header = "Was buyer 2's income used for a mortgage application?"
@check_answer_label = "Buyer 2s income used for mortgage application"
@header = "Was buyer 2s income used for a mortgage application?"
@type = "radio"
@answer_options = ANSWER_OPTIONS
@check_answers_card_number = 2
@ -12,5 +12,6 @@ class Form::Sales::Questions::Buyer2Mortgage < ::Form::Question
ANSWER_OPTIONS = {
"1" => { "value" => "Yes" },
"2" => { "value" => "No" },
"3" => { "value" => "Don’t know" },
}.freeze
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
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
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
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({
"1" => { "value" => "Yes" },
"2" => { "value" => "No" },
"3" => { "value" => "Don’t know" },
})
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
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
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
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" },
"7" => { "value" => "Temporary accomodation" },
"9" => { "value" => "Other" },
"0" => { "value" => "Don’t know" },
})
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
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
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
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({
"1" => { "value" => "Yes" },
"2" => { "value" => "No" },
"3" => { "value" => "Don’t know" },
})
end

Loading…
Cancel
Save