|
|
|
@ -1,10 +1,8 @@ |
|
|
|
require "rails_helper" |
|
|
|
require "rails_helper" |
|
|
|
|
|
|
|
|
|
|
|
RSpec.describe Form::Lettings::Subsections::PropertyInformation, type: :model do |
|
|
|
RSpec.describe Form::Lettings::Subsections::PropertyInformation, type: :model do |
|
|
|
subject(:property_information) { described_class.new(subsection_id, subsection_definition, section) } |
|
|
|
subject(:property_information) { described_class.new(nil, nil, section) } |
|
|
|
|
|
|
|
|
|
|
|
let(:subsection_id) { nil } |
|
|
|
|
|
|
|
let(:subsection_definition) { nil } |
|
|
|
|
|
|
|
let(:section) { instance_double(Form::Lettings::Sections::TenancyAndProperty) } |
|
|
|
let(:section) { instance_double(Form::Lettings::Sections::TenancyAndProperty) } |
|
|
|
|
|
|
|
|
|
|
|
it "has correct section" do |
|
|
|
it "has correct section" do |
|
|
|
@ -44,6 +42,13 @@ 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([{ "non_location_setup_questions_completed?" => true, "supported_housing_and_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 |
|
|
|
end |
|
|
|
end |
|
|
|
|