|
|
@ -218,10 +218,10 @@ RSpec.describe Form, type: :model do |
|
|
|
expect(form.sections[0].class).to eq(Form::Sales::Sections::Setup) |
|
|
|
expect(form.sections[0].class).to eq(Form::Sales::Sections::Setup) |
|
|
|
expect(form.subsections.count).to eq(1) |
|
|
|
expect(form.subsections.count).to eq(1) |
|
|
|
expect(form.subsections.first.id).to eq("setup") |
|
|
|
expect(form.subsections.first.id).to eq("setup") |
|
|
|
expect(form.pages.count).to eq(2) |
|
|
|
expect(form.pages.count).to eq(4) |
|
|
|
expect(form.pages.first.id).to eq("purchaser_code") |
|
|
|
expect(form.pages.first.id).to eq("organisation") |
|
|
|
expect(form.questions.count).to eq(2) |
|
|
|
expect(form.questions.count).to eq(4) |
|
|
|
expect(form.questions.first.id).to eq("purchid") |
|
|
|
expect(form.questions.first.id).to eq("owning_organisation_id") |
|
|
|
expect(form.start_date).to eq(Time.zone.parse("2022-04-01")) |
|
|
|
expect(form.start_date).to eq(Time.zone.parse("2022-04-01")) |
|
|
|
expect(form.end_date).to eq(Time.zone.parse("2023-07-01")) |
|
|
|
expect(form.end_date).to eq(Time.zone.parse("2023-07-01")) |
|
|
|
end |
|
|
|
end |
|
|
|