diff --git a/app/models/form/sales/pages/buyer2_previous_housing_situation.rb b/app/models/form/sales/pages/buyer2_previous_housing_situation.rb index c08501c09..c6a511243 100644 --- a/app/models/form/sales/pages/buyer2_previous_housing_situation.rb +++ b/app/models/form/sales/pages/buyer2_previous_housing_situation.rb @@ -2,7 +2,7 @@ class Form::Sales::Pages::Buyer2PreviousHousingSituation < ::Form::Page def initialize(id, hsh, subsection) super @id = "buyer_2_previous_housing_situation" - @depends_on = [{ "buyer_two_not_already_living_in?" => true }] + @depends_on = [{ "buyer_two_not_already_living_in_property?" => true }] end def questions diff --git a/app/models/form/sales/questions/buyer2_living_in.rb b/app/models/form/sales/questions/buyer2_living_in.rb index f05773169..1494e61a2 100644 --- a/app/models/form/sales/questions/buyer2_living_in.rb +++ b/app/models/form/sales/questions/buyer2_living_in.rb @@ -2,8 +2,8 @@ class Form::Sales::Questions::Buyer2LivingIn < ::Form::Question def initialize(id, hsh, page) super @id = "buy2living" - @check_answer_label = "All buyers living at the same address" - @header = "Were all buyers living at the same address at the time of purchase?" + @check_answer_label = "Buyer 2 living at the same address" + @header = "At the time of purchase, was buyer 2 living at the same address as buyer 1?" @type = "radio" @hint_text = "" @answer_options = ANSWER_OPTIONS diff --git a/app/models/sales_log.rb b/app/models/sales_log.rb index 3628911b2..e15b9c610 100644 --- a/app/models/sales_log.rb +++ b/app/models/sales_log.rb @@ -155,7 +155,7 @@ class SalesLog < Log buy2livein == 1 end - def buyer_two_not_already_living_in? + def buyer_two_not_already_living_in_property? buy2living == 2 end diff --git a/spec/models/form/sales/pages/buyer2_previous_housing_situation_spec.rb b/spec/models/form/sales/pages/buyer2_previous_housing_situation_spec.rb index 7d185c2ff..ac5611a8f 100644 --- a/spec/models/form/sales/pages/buyer2_previous_housing_situation_spec.rb +++ b/spec/models/form/sales/pages/buyer2_previous_housing_situation_spec.rb @@ -26,6 +26,6 @@ RSpec.describe Form::Sales::Pages::Buyer2PreviousHousingSituation, type: :model end it "has correct depends_on" do - expect(page.depends_on).to eq([{ "buyer_two_not_already_living_in?" => true }]) + expect(page.depends_on).to eq([{ "buyer_two_not_already_living_in_property?" => true }]) end end diff --git a/spec/models/form/sales/questions/buyer2_living_in_spec.rb b/spec/models/form/sales/questions/buyer2_living_in_spec.rb index bb0e0d7ef..4fca65f3f 100644 --- a/spec/models/form/sales/questions/buyer2_living_in_spec.rb +++ b/spec/models/form/sales/questions/buyer2_living_in_spec.rb @@ -6,23 +6,23 @@ RSpec.describe Form::Sales::Questions::Buyer2LivingIn, type: :model do let(:page) { instance_double(Form::Page) } it "has correct page" do - expect(question.page).to eq(page) + expect(question.page).to eq page end it "has the correct id" do - expect(question.id).to eq("buy2living") + expect(question.id).to eq "buy2living" end it "has the correct header" do - expect(question.header).to eq("Were all buyers living at the same address at the time of purchase?") + expect(question.header).to eq "At the time of purchase, was buyer 2 living at the same address as buyer 1?" end it "has the correct check_answer_label" do - expect(question.check_answer_label).to eq("All buyers living at the same address") + expect(question.check_answer_label).to eq "Buyer 2 living at the same address" end it "has the correct type" do - expect(question.type).to eq("radio") + expect(question.type).to eq "radio" end it "is not marked as derived" do @@ -30,7 +30,7 @@ RSpec.describe Form::Sales::Questions::Buyer2LivingIn, type: :model do end it "has the correct hint_text" do - expect(question.hint_text).to eq("") + expect(question.hint_text).to eq "" end it "has the correct answer_options" do