From 19980955ead0afa60d1e740b4065dd63ea92ae65 Mon Sep 17 00:00:00 2001 From: Thomas Leese Date: Mon, 19 Feb 2024 11:19:29 +0100 Subject: [PATCH] Improve example data for certain countries For Scotland, Northern Ireland and Ukraine we don't verify the work history, this updates the example data to better reflect this situation and ensure that it works correctly in the test environment. --- lib/tasks/example_data.rake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/tasks/example_data.rake b/lib/tasks/example_data.rake index 1d145fb08f..bd8357fc0f 100644 --- a/lib/tasks/example_data.rake +++ b/lib/tasks/example_data.rake @@ -214,6 +214,15 @@ def create_application_forms assessment = AssessmentFactory.call(application_form:) + if application_form.reduced_evidence_accepted || + !application_form.needs_work_history + assessment.update!(induction_required: false) + end + + if CountryCode.scotland?(application_form.country.code) + assessment.update!(scotland_full_registration: true) + end + if application_form.declined_at.present? FactoryBot.create( :selected_failure_reason,