You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
862 B
37 lines
862 B
2 years ago
|
require "rails_helper"
|
||
|
|
||
2 years ago
|
RSpec.describe Form::Lettings::Subsections::Setup, type: :model do
|
||
2 years ago
|
subject(:setup) { described_class.new(subsection_id, subsection_definition, section) }
|
||
|
|
||
|
let(:subsection_id) { nil }
|
||
|
let(:subsection_definition) { nil }
|
||
2 years ago
|
let(:section) { instance_double(Form::Lettings::Sections::Setup) }
|
||
2 years ago
|
|
||
|
it "has correct section" do
|
||
|
expect(setup.section).to eq(section)
|
||
|
end
|
||
|
|
||
|
it "has correct pages" do
|
||
2 years ago
|
expect(setup.pages.map(&:id)).to eq(
|
||
|
%w[organisation
|
||
|
created_by
|
||
|
needs_type
|
||
2 years ago
|
scheme
|
||
|
location
|
||
2 years ago
|
renewal
|
||
|
tenancy_start_date
|
||
|
rent_type
|
||
|
tenant_code
|
||
|
property_reference],
|
||
|
)
|
||
2 years ago
|
end
|
||
|
|
||
|
it "has the correct id" do
|
||
|
expect(setup.id).to eq("setup")
|
||
|
end
|
||
|
|
||
|
it "has the correct label" do
|
||
|
expect(setup.label).to eq("Set up this lettings log")
|
||
|
end
|
||
|
end
|