Browse Source

Pluralise other buyers, update privacy notice test

pull/2272/head
Kat 2 years ago
parent
commit
bf457be064
  1. 2
      app/models/form/sales/questions/housing_benefits.rb
  2. 2
      app/models/form/sales/questions/number_joint_buyers.rb
  3. 2
      spec/models/form/sales/questions/number_joint_buyers_spec.rb
  4. 2
      spec/models/form/sales/questions/privacy_notice_spec.rb

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

@ -2,7 +2,7 @@ class Form::Sales::Questions::HousingBenefits < ::Form::Question
def initialize(id, hsh, page, joint_purchase:)
super(id, hsh, page)
@id = "hb"
@check_answer_label = "Housing-related benefits buyer received before buying this property"
@check_answer_label = "Housing-related benefits #{joint_purchase ? 'buyers' : 'buyer'} received before buying this property"
@header = "#{joint_purchase ? 'Were the buyers' : 'Was the buyer'} receiving any of these housing-related benefits immediately before buying this property?"
@type = "radio"
@answer_options = ANSWER_OPTIONS

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

@ -19,7 +19,7 @@ class Form::Sales::Questions::NumberJointBuyers < ::Form::Question
if form.start_year_after_2024?
nil
else
"You should still try to answer all questions even if the buyer wasn't interviewed in person"
"You should still try to answer all questions even if the buyers weren't interviewed in person"
end
end
end

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

@ -38,7 +38,7 @@ RSpec.describe Form::Sales::Questions::NumberJointBuyers, type: :model do
end
it "has the correct hint_text" do
expect(question.hint_text).to eq("You should still try to answer all questions even if the buyer wasn't interviewed in person")
expect(question.hint_text).to eq("You should still try to answer all questions even if the buyers weren't interviewed in person")
end
it "has the correct answer_options" do

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

@ -1,7 +1,7 @@
require "rails_helper"
RSpec.describe Form::Sales::Questions::PrivacyNotice, type: :model do
subject(:question) { described_class.new(question_id, question_definition, page) }
subject(:question) { described_class.new(question_id, question_definition, page, joint_purchase: false) }
let(:question_id) { nil }
let(:question_definition) { nil }

Loading…
Cancel
Save