Browse Source

Trim test form and fix tests

pull/46/head
MadeTech Dushan 4 years ago
parent
commit
5d102cd556
  1. 25
      config/forms/test_form.json
  2. 4
      spec/helpers/check_answers_helper_spec.rb

25
config/forms/test_form.json

@ -148,17 +148,6 @@
"1": "No", "1": "No",
"2": "Prefer not to say" "2": "Prefer not to say"
} }
},
"armed_forces_partner": {
"header": "Was the tenant the spouse or civil partner of someone who served in the UK armed forces?",
"type": "radio",
"check_answer_label": "Was the tenant the spouse or civil partner of someone who served in the UK armed forces?",
"answer_options": {
"0": "Yes - was the spouse or civil partner of a UK Armed Forces member and have separated within the last 2 years",
"1": "Yes - was the spouse or civil partner of a UK Armed Forces member who died within the last 2 years",
"2": "No",
"3": "Prefer not to say"
}
} }
} }
}, },
@ -177,20 +166,6 @@
} }
} }
}, },
"pregnancy": {
"questions": {
"pregnancy": {
"header": "Is anyone in the household pregnant?",
"type": "radio",
"check_answer_label": "Pregnancy in the household",
"answer_options": {
"0": "Yes",
"1": "No",
"2": "Prefer not to say"
}
}
}
},
"accessibility_requirements": { "accessibility_requirements": {
"questions": { "questions": {
"accessibility_requirements": { "accessibility_requirements": {

4
spec/helpers/check_answers_helper_spec.rb

@ -75,7 +75,7 @@ RSpec.describe CheckAnswersHelper do
end end
it "ignores questions with unmet radio conditions" do it "ignores questions with unmet radio conditions" do
expect(total_number_of_questions(subsection_with_radio_conditionals, case_log, form)).to eq(6) expect(total_number_of_questions(subsection_with_radio_conditionals, case_log, form)).to eq(4)
end end
it "includes conditional questions with met radio conditions" do it "includes conditional questions with met radio conditions" do
@ -83,7 +83,7 @@ RSpec.describe CheckAnswersHelper do
subsection_with_radio_conditionals, subsection_with_radio_conditionals,
case_log_with_met_radio_condition, case_log_with_met_radio_condition,
form, form,
)).to eq(8) )).to eq(6)
end end
context "conditional questions with type that hasn't been implemented yet" do context "conditional questions with type that hasn't been implemented yet" do

Loading…
Cancel
Save