diff --git a/app/models/form/lettings/subsections/property_information.rb b/app/models/form/lettings/subsections/property_information.rb index 67c4d2661..6e20ea7cf 100644 --- a/app/models/form/lettings/subsections/property_information.rb +++ b/app/models/form/lettings/subsections/property_information.rb @@ -29,6 +29,6 @@ class Form::Lettings::Subsections::PropertyInformation < ::Form::Subsection end def displayed_in_tasklist?(log) - !log.is_supported_housing? || !log.is_renewal? + !(log.is_supported_housing? && log.is_renewal?) end end diff --git a/spec/factories/lettings_log.rb b/spec/factories/lettings_log.rb index b0667b817..98876bdd3 100644 --- a/spec/factories/lettings_log.rb +++ b/spec/factories/lettings_log.rb @@ -30,7 +30,7 @@ FactoryBot.define do age1 { 34 } sex1 { "M" } ethnic { 2 } - national { 4 } + national { 18 } ecstat1 { 2 } hhmemb { 1 } end @@ -43,7 +43,7 @@ FactoryBot.define do sex1 { "F" } ethnic_group { 0 } ethnic { 2 } - national { 4 } + national { 18 } prevten { 6 } ecstat1 { 0 } hhmemb { 2 } @@ -79,7 +79,7 @@ FactoryBot.define do supcharg { 35 } tcharge { 325 } layear { 2 } - waityear { 1 } + waityear { 7 } postcode_known { 1 } postcode_full { Faker::Address.postcode } reasonpref { 1 } diff --git a/spec/models/form_spec.rb b/spec/models/form_spec.rb index 42c273ee1..3236623c1 100644 --- a/spec/models/form_spec.rb +++ b/spec/models/form_spec.rb @@ -195,7 +195,7 @@ RSpec.describe Form, type: :model do FormHandler.instance.use_fake_forms! end - fit "finds the path to the section after" do + it "finds the path to the section after" do lettings_log.startdate = Time.zone.local(2022, 9, 1) lettings_log.renewal = 1 lettings_log.needstype = 2