diff --git a/spec/fixtures/forms/2021_2022.json b/spec/fixtures/forms/2021_2022.json index 4bffa4602..2d290981f 100644 --- a/spec/fixtures/forms/2021_2022.json +++ b/spec/fixtures/forms/2021_2022.json @@ -367,6 +367,7 @@ "earnings": { "check_answer_label": "Income", "header": "What is the tenant’s /and partner’s combined income after tax?", + "guidance_partial": "what_counts_as_income", "type": "numeric", "min": 0, "step": 1, diff --git a/spec/requests/form_controller_spec.rb b/spec/requests/form_controller_spec.rb index e40648d2f..65e1f09f4 100644 --- a/spec/requests/form_controller_spec.rb +++ b/spec/requests/form_controller_spec.rb @@ -66,6 +66,13 @@ RSpec.describe FormController, type: :request do expect(response).to have_http_status(:not_found) end end + + context "a form page that has custom guidance" do + it "displays the correct partial" do + get "/logs/#{case_log.id}/net-income", headers: headers, params: {} + expect(response.body).to match("What counts as income?") + end + end end context "check answers pages" do