From 51376b7b87fd5ccdf30f7800754671d08f9738d9 Mon Sep 17 00:00:00 2001 From: Aaron Spencer Date: Mon, 26 Jun 2023 12:11:47 +0100 Subject: [PATCH] CLDC-2439: removed informative info tests and rent value check --- .../form/lettings/questions/rent_value_check.rb | 14 -------------- .../lettings/pages/max_rent_value_check_spec.rb | 4 ---- .../lettings/pages/min_rent_value_check_spec.rb | 13 ------------- 3 files changed, 31 deletions(-) delete mode 100644 app/models/form/lettings/questions/rent_value_check.rb diff --git a/app/models/form/lettings/questions/rent_value_check.rb b/app/models/form/lettings/questions/rent_value_check.rb deleted file mode 100644 index 6bca43e30..000000000 --- a/app/models/form/lettings/questions/rent_value_check.rb +++ /dev/null @@ -1,14 +0,0 @@ -class Form::Lettings::Questions::RentValueCheck < ::Form::Question - def initialize(id, hsh, page, check_answers_card_number:) - super(id, hsh, page) - @id = "rent_value_check" - @check_answer_label = "Total rent confirmation" - @header = "Are you sure this is correct?" - @type = "interruption_screen" - @check_answers_card_number = check_answers_card_number - @answer_options = ANSWER_OPTIONS - @hidden_in_check_answers = { "depends_on" => [{ "rent_value_check" => 0 }, { "rent_value_check" => 1 }] } - end - - ANSWER_OPTIONS = { "0" => { "value" => "Yes" }, "1" => { "value" => "No" } }.freeze -end diff --git a/spec/models/form/lettings/pages/max_rent_value_check_spec.rb b/spec/models/form/lettings/pages/max_rent_value_check_spec.rb index 7bcc87913..4bbe3d18f 100644 --- a/spec/models/form/lettings/pages/max_rent_value_check_spec.rb +++ b/spec/models/form/lettings/pages/max_rent_value_check_spec.rb @@ -31,10 +31,6 @@ RSpec.describe Form::Lettings::Pages::MaxRentValueCheck, type: :model do expect(page.title_text).to eq({ "arguments" => [{ "i18n_template" => "brent", "key" => "brent", "label" => true }], "translation" => "soft_validations.rent.outside_range_title" }) end - it "has the correct informative_text" do - expect(page.informative_text).to eq({ "arguments" => [{ "arguments_for_key" => "soft_max_for_period", "i18n_template" => "soft_max_for_period", "key" => "field_formatted_as_currency" }], "translation" => "soft_validations.rent.max_hint_text" }) - end - it "has the correct interruption_screen_question_ids" do expect(page.interruption_screen_question_ids).to eq(%w[brent startdate uprn postcode_full la beds rent_type needstype]) end diff --git a/spec/models/form/lettings/pages/min_rent_value_check_spec.rb b/spec/models/form/lettings/pages/min_rent_value_check_spec.rb index bc3c6a081..613c907e9 100644 --- a/spec/models/form/lettings/pages/min_rent_value_check_spec.rb +++ b/spec/models/form/lettings/pages/min_rent_value_check_spec.rb @@ -40,19 +40,6 @@ RSpec.describe Form::Lettings::Pages::MinRentValueCheck, type: :model do }) end - it "has the correct informative_text" do - expect(page.informative_text).to eq({ - "translation" => "soft_validations.rent.min_hint_text", - "arguments" => [ - { - "key" => "field_formatted_as_currency", - "arguments_for_key" => "soft_min_for_period", - "i18n_template" => "soft_min_for_period", - }, - ], - }) - end - it "has the correct interruption_screen_question_ids" do expect(page.interruption_screen_question_ids).to eq(%w[brent startdate uprn postcode_full la beds rent_type needstype]) end