Browse Source

linty fluff begone

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

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

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

10
spec/requests/lettings_logs_controller_spec.rb

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

Loading…
Cancel
Save