Browse Source

CLDC-2439: removed informative info tests and rent value check

pull/1718/head
Aaron Spencer 3 years ago
parent
commit
51376b7b87
  1. 14
      app/models/form/lettings/questions/rent_value_check.rb
  2. 4
      spec/models/form/lettings/pages/max_rent_value_check_spec.rb
  3. 13
      spec/models/form/lettings/pages/min_rent_value_check_spec.rb

14
app/models/form/lettings/questions/rent_value_check.rb

@ -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

4
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

13
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

Loading…
Cancel
Save