Browse Source

minor refactor to displayed_is_tasklist condition and changes in testing

pull/1368/head
Arthur Campbell 3 years ago
parent
commit
cf377dfecd
  1. 2
      app/models/form/lettings/subsections/property_information.rb
  2. 6
      spec/factories/lettings_log.rb
  3. 2
      spec/models/form_spec.rb

2
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

6
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 }

2
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

Loading…
Cancel
Save