Browse Source

refactor: linting

pull/1120/head
natdeanlewissoftwire 4 years ago
parent
commit
e231e227d7
  1. 1
      app/models/form/question.rb
  2. 2
      spec/models/form/sales/questions/buyers_organisations_spec.rb
  3. 0
      spec/models/form/sales/subsections/household_needs_spec.rb

1
app/models/form/question.rb

@ -131,6 +131,7 @@ class Form::Question
def unanswered?(log) def unanswered?(log)
return answer_options.keys.none? { |key| value_is_yes?(log[key]) } if type == "checkbox" return answer_options.keys.none? { |key| value_is_yes?(log[key]) } if type == "checkbox"
log[id].blank? log[id].blank?
end end

2
spec/models/form/sales/questions/buyers_organisations_spec.rb

@ -42,7 +42,7 @@ RSpec.describe Form::Sales::Questions::BuyersOrganisations, type: :model do
"pregother" => { "value" => "Other private registered provider (PRP) - housing association" }, "pregother" => { "value" => "Other private registered provider (PRP) - housing association" },
"pregla" => { "value" => "Local Authority" }, "pregla" => { "value" => "Local Authority" },
"pregghb" => { "value" => "Help to Buy Agent" }, "pregghb" => { "value" => "Help to Buy Agent" },
} },
) )
end end
end end

0
spec/models/form/sales/subsections/household_needs_spec copy.rb → spec/models/form/sales/subsections/household_needs_spec.rb

Loading…
Cancel
Save