From 7e950564ae59cf718f7bd729348ac4441f141b14 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Date: Fri, 6 Jan 2023 09:26:10 +0000 Subject: [PATCH] feat: respond to PR comments (#1138) * feat: respond to PR comments * test: update tests --- app/models/form/sales/pages/privacy_notice.rb | 2 +- app/models/form/sales/questions/buyer_interview.rb | 2 +- spec/factories/sales_log.rb | 1 + spec/models/form/sales/pages/privacy_notice_spec.rb | 2 +- spec/models/form/sales/questions/buyer_interview_spec.rb | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/models/form/sales/pages/privacy_notice.rb b/app/models/form/sales/pages/privacy_notice.rb index a7e8ca219..7c1056ccb 100644 --- a/app/models/form/sales/pages/privacy_notice.rb +++ b/app/models/form/sales/pages/privacy_notice.rb @@ -6,7 +6,7 @@ class Form::Sales::Pages::PrivacyNotice < ::Form::Page @description = "" @subsection = subsection @depends_on = [{ - "noint" => 1, + "noint" => 2, }] end diff --git a/app/models/form/sales/questions/buyer_interview.rb b/app/models/form/sales/questions/buyer_interview.rb index d270d9d33..1b354b1d5 100644 --- a/app/models/form/sales/questions/buyer_interview.rb +++ b/app/models/form/sales/questions/buyer_interview.rb @@ -11,7 +11,7 @@ class Form::Sales::Questions::BuyerInterview < ::Form::Question end ANSWER_OPTIONS = { - "1" => { "value" => "No" }, "2" => { "value" => "Yes" }, + "1" => { "value" => "No" }, }.freeze end diff --git a/spec/factories/sales_log.rb b/spec/factories/sales_log.rb index c2fd7e97a..44ff8de35 100644 --- a/spec/factories/sales_log.rb +++ b/spec/factories/sales_log.rb @@ -21,6 +21,7 @@ FactoryBot.define do beds { 2 } jointmore { 1 } noint { 2 } + privacynotice { 1 } age1_known { 0 } age1 { 30 } sex1 { "X" } diff --git a/spec/models/form/sales/pages/privacy_notice_spec.rb b/spec/models/form/sales/pages/privacy_notice_spec.rb index 9c957b0b5..8a8de04f1 100644 --- a/spec/models/form/sales/pages/privacy_notice_spec.rb +++ b/spec/models/form/sales/pages/privacy_notice_spec.rb @@ -28,6 +28,6 @@ RSpec.describe Form::Sales::Pages::PrivacyNotice, type: :model do end it "has correct depends_on" do - expect(page.depends_on).to eq([{ "noint" => 1 }]) + expect(page.depends_on).to eq([{ "noint" => 2 }]) end end diff --git a/spec/models/form/sales/questions/buyer_interview_spec.rb b/spec/models/form/sales/questions/buyer_interview_spec.rb index 69c45ee4e..433d46f8b 100644 --- a/spec/models/form/sales/questions/buyer_interview_spec.rb +++ b/spec/models/form/sales/questions/buyer_interview_spec.rb @@ -37,8 +37,8 @@ RSpec.describe Form::Sales::Questions::BuyerInterview, type: :model do it "has the correct answer_options" do expect(question.answer_options).to eq({ - "1" => { "value" => "No" }, "2" => { "value" => "Yes" }, + "1" => { "value" => "No" }, }) end end