Submit social housing lettings and sales data (CORE)
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.

40 lines
1.1 KiB

Cldc 1440 household situation section (#1132) * feat: add question page and subsection (#1120) * feat: add question page and subsection * refactor: linting * feat: remove schema rows from other branch * feat: slight refactor, fix tag behaviour and add section tests * test: update and add tests * feat: update status behaviour * feat: update subsection status tag * refactor: linting * [CLDC-857] Add household wheelchair check (#1122) * [CLDC-857] Add household wheelchair check * Hide only if answered * Cldc 1497 ever served armed forces (#1124) * feat: add question and page * test: update tests * refactor: linting and slight test updates * test: fix tests * Cldc 1498 still serving armed forces (#1123) * feat: new question and tests * test: update subsection spec * test: update tests * feat: (future) conflict resolving * feat: more conflict resolution * feat: update db field * test: update id * test: updates * Cldc 1488 last accomodation (#1125) * Add postcode fields * Add previous postcode page and questions * Add last accommodation page to household situation subsection * add previous la known to the db * infer correct location fields * styling * Reorder disability questions (#1127) * [CLDC-1487] Add buyer1 previous tenure question (#1133) * use collection_start_year instead of the startdate (#1128) * [CLDC-1487] Add buyer 1 previous tenure Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * feat: fix routing (#1141) * Add last accommodation la question (#1142) * move hint text (#1146) Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: Jack S <113976590+bibblobcode@users.noreply.github.com>
2 years ago
require "rails_helper"
RSpec.describe Form::Sales::Subsections::HouseholdNeeds, type: :model do
subject(:household_characteristics) { described_class.new(subsection_id, subsection_definition, section) }
let(:subsection_id) { nil }
let(:subsection_definition) { nil }
let(:section) { instance_double(Form::Sales::Sections::Household) }
it "has correct section" do
expect(household_characteristics.section).to eq(section)
end
it "has correct pages" do
expect(household_characteristics.pages.map(&:id)).to eq(
%w[
armed_forces
buyer_still_serving
armed_forces_spouse
Cldc 1440 household situation section (#1132) * feat: add question page and subsection (#1120) * feat: add question page and subsection * refactor: linting * feat: remove schema rows from other branch * feat: slight refactor, fix tag behaviour and add section tests * test: update and add tests * feat: update status behaviour * feat: update subsection status tag * refactor: linting * [CLDC-857] Add household wheelchair check (#1122) * [CLDC-857] Add household wheelchair check * Hide only if answered * Cldc 1497 ever served armed forces (#1124) * feat: add question and page * test: update tests * refactor: linting and slight test updates * test: fix tests * Cldc 1498 still serving armed forces (#1123) * feat: new question and tests * test: update subsection spec * test: update tests * feat: (future) conflict resolving * feat: more conflict resolution * feat: update db field * test: update id * test: updates * Cldc 1488 last accomodation (#1125) * Add postcode fields * Add previous postcode page and questions * Add last accommodation page to household situation subsection * add previous la known to the db * infer correct location fields * styling * Reorder disability questions (#1127) * [CLDC-1487] Add buyer1 previous tenure question (#1133) * use collection_start_year instead of the startdate (#1128) * [CLDC-1487] Add buyer 1 previous tenure Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * feat: fix routing (#1141) * Add last accommodation la question (#1142) * move hint text (#1146) Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: Jack S <113976590+bibblobcode@users.noreply.github.com>
2 years ago
household_disability
disability_wheelchair_check
Cldc 1440 household situation section (#1132) * feat: add question page and subsection (#1120) * feat: add question page and subsection * refactor: linting * feat: remove schema rows from other branch * feat: slight refactor, fix tag behaviour and add section tests * test: update and add tests * feat: update status behaviour * feat: update subsection status tag * refactor: linting * [CLDC-857] Add household wheelchair check (#1122) * [CLDC-857] Add household wheelchair check * Hide only if answered * Cldc 1497 ever served armed forces (#1124) * feat: add question and page * test: update tests * refactor: linting and slight test updates * test: fix tests * Cldc 1498 still serving armed forces (#1123) * feat: new question and tests * test: update subsection spec * test: update tests * feat: (future) conflict resolving * feat: more conflict resolution * feat: update db field * test: update id * test: updates * Cldc 1488 last accomodation (#1125) * Add postcode fields * Add previous postcode page and questions * Add last accommodation page to household situation subsection * add previous la known to the db * infer correct location fields * styling * Reorder disability questions (#1127) * [CLDC-1487] Add buyer1 previous tenure question (#1133) * use collection_start_year instead of the startdate (#1128) * [CLDC-1487] Add buyer 1 previous tenure Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * feat: fix routing (#1141) * Add last accommodation la question (#1142) * move hint text (#1146) Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: Jack S <113976590+bibblobcode@users.noreply.github.com>
2 years ago
household_wheelchair
wheelchair_check
],
)
end
it "has the correct id" do
expect(household_characteristics.id).to eq("household_needs")
end
it "has the correct label" do
expect(household_characteristics.label).to eq("Other household information")
Cldc 1440 household situation section (#1132) * feat: add question page and subsection (#1120) * feat: add question page and subsection * refactor: linting * feat: remove schema rows from other branch * feat: slight refactor, fix tag behaviour and add section tests * test: update and add tests * feat: update status behaviour * feat: update subsection status tag * refactor: linting * [CLDC-857] Add household wheelchair check (#1122) * [CLDC-857] Add household wheelchair check * Hide only if answered * Cldc 1497 ever served armed forces (#1124) * feat: add question and page * test: update tests * refactor: linting and slight test updates * test: fix tests * Cldc 1498 still serving armed forces (#1123) * feat: new question and tests * test: update subsection spec * test: update tests * feat: (future) conflict resolving * feat: more conflict resolution * feat: update db field * test: update id * test: updates * Cldc 1488 last accomodation (#1125) * Add postcode fields * Add previous postcode page and questions * Add last accommodation page to household situation subsection * add previous la known to the db * infer correct location fields * styling * Reorder disability questions (#1127) * [CLDC-1487] Add buyer1 previous tenure question (#1133) * use collection_start_year instead of the startdate (#1128) * [CLDC-1487] Add buyer 1 previous tenure Co-authored-by: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> * feat: fix routing (#1141) * Add last accommodation la question (#1142) * move hint text (#1146) Co-authored-by: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Co-authored-by: Jack S <113976590+bibblobcode@users.noreply.github.com>
2 years ago
end
it "has correct depends on" do
expect(household_characteristics.depends_on).to eq([{ "setup_completed?" => true }])
end
end