From a9596a46266e8e54a6e94af307ba9b7fd22b4fde Mon Sep 17 00:00:00 2001 From: Aaron Spencer Date: Wed, 21 Jun 2023 22:36:37 +0100 Subject: [PATCH] CLDC-2545: linting --- app/models/form/sales/questions/mortgageused.rb | 2 +- .../form/sales/questions/mortgageused_spec.rb | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/models/form/sales/questions/mortgageused.rb b/app/models/form/sales/questions/mortgageused.rb index aac846662..33027ea85 100644 --- a/app/models/form/sales/questions/mortgageused.rb +++ b/app/models/form/sales/questions/mortgageused.rb @@ -18,7 +18,7 @@ class Form::Sales::Questions::Mortgageused < ::Form::Question def displayed_answer_options(log, _user = nil) if log.stairowned == 100 && - ANSWER_OPTIONS + ANSWER_OPTIONS else { "1" => { "value" => "Yes" }, diff --git a/spec/models/form/sales/questions/mortgageused_spec.rb b/spec/models/form/sales/questions/mortgageused_spec.rb index 12f46643b..e2df7c65a 100644 --- a/spec/models/form/sales/questions/mortgageused_spec.rb +++ b/spec/models/form/sales/questions/mortgageused_spec.rb @@ -50,22 +50,24 @@ RSpec.describe Form::Sales::Questions::Mortgageused, type: :model do context "staircase owned percentage is 100%" do let(:log) { build(:sales_log, stairowned: 100) } + it "show's the don't know option" do expect(question.displayed_answer_options(log)).to eq({ - "1" => { "value" => "Yes" }, - "2" => { "value" => "No" }, - "3" => { "value" => "Don’t know" } + "1" => { "value" => "Yes" }, + "2" => { "value" => "No" }, + "3" => { "value" => "Don’t know" }, }) end end context "staircase owned percentage is less than 100%" do let(:log) { build(:sales_log, stairowned: 99) } + it "show's the don't know option" do expect(question.displayed_answer_options(log)).to eq({ - "1" => { "value" => "Yes" }, - "2" => { "value" => "No" }, - }) + "1" => { "value" => "Yes" }, + "2" => { "value" => "No" }, + }) end end end