diff --git a/app/lib/forms/possible_funding.rb b/app/lib/forms/possible_funding.rb index 4a59d33c72..3f02d2c263 100644 --- a/app/lib/forms/possible_funding.rb +++ b/app/lib/forms/possible_funding.rb @@ -24,8 +24,8 @@ def after_save def message_template return "private_childcare_provider" if institution.is_a?(PrivateChildcareProvider) - return "lead_mentor" if Course.npqltd.include?(course) - return "funding_eligibility_unclear" if works_in_other? && (employment_type_other? || valid_employent_type_for_england?) + return "lead_mentor" if Course.npqltd.include?(course) && !is_funding_eligibility_unclear? + return "funding_eligibility_unclear" if is_funding_eligibility_unclear? if targeted_delivery_funding_eligibility? "eligible_for_scholarship_funding" @@ -48,6 +48,10 @@ def valid_employent_type_for_england? wizard.query_store.valid_employent_type_for_england? end + def is_funding_eligibility_unclear? + works_in_other? && (employment_type_other? || valid_employent_type_for_england?) + end + def targeted_delivery_funding_eligibility? wizard.query_store.targeted_delivery_funding_eligibility? end diff --git a/spec/features/journeys/happy_paths/when_choose_lead_mentor_course_spec.rb b/spec/features/journeys/happy_paths/when_choose_lead_mentor_course_spec.rb index f896ba7653..3042e617d6 100644 --- a/spec/features/journeys/happy_paths/when_choose_lead_mentor_course_spec.rb +++ b/spec/features/journeys/happy_paths/when_choose_lead_mentor_course_spec.rb @@ -58,7 +58,7 @@ def run_scenario(js:) expect_page_to_have(path: "/registration/possible-funding", submit_form: true) do expect(page).to have_text("Funding eligibility") - expect(page).to have_text("You’re eligible for scholarship funding for the") + expect(page).to have_text("If you are eligible, you would not have to pay for the course fees.") end expect_page_to_have(path: "/registration/choose-your-provider", submit_form: true) do