Browse Source

linty fluff begone

pull/1368/head
Arthur Campbell 3 years ago
parent
commit
4d4f88bda9
  1. 6
      spec/models/form/lettings/subsections/property_information_spec.rb
  2. 10
      spec/requests/lettings_logs_controller_spec.rb

6
spec/models/form/lettings/subsections/property_information_spec.rb

@ -42,13 +42,15 @@ RSpec.describe Form::Lettings::Subsections::PropertyInformation, type: :model do
end end
it "has the correct depends_on" do it "has the correct depends_on" do
expect(property_information.depends_on).to eq([{ expect(property_information.depends_on).to eq([
{
"non_location_setup_questions_completed?" => true, "non_location_setup_questions_completed?" => true,
"is_supported_housing?" => false, "is_supported_housing?" => false,
}, },
{ {
"non_location_setup_questions_completed?" => true, "non_location_setup_questions_completed?" => true,
"is_renewal?" => false, "is_renewal?" => false,
}]) },
])
end end
end end

10
spec/requests/lettings_logs_controller_spec.rb

@ -892,8 +892,9 @@ RSpec.describe LettingsLogsController, type: :request do
end end
context "when a lettings log is for a renewal of supported housing, so property information does not need to show" do context "when a lettings log is for a renewal of supported housing, so property information does not need to show" do
let(:lettings_log) { let(:lettings_log) do
FactoryBot.create(:lettings_log, FactoryBot.create(
:lettings_log,
owning_organisation: user.organisation, owning_organisation: user.organisation,
managing_organisation: user.organisation, managing_organisation: user.organisation,
created_by: user, created_by: user,
@ -901,8 +902,9 @@ RSpec.describe LettingsLogsController, type: :request do
renewal: 1, renewal: 1,
needstype: 2, needstype: 2,
rent_type: 3, rent_type: 3,
postcode_known: 0 postcode_known: 0,
)} )
end
before do before do
sign_in user sign_in user

Loading…
Cancel
Save