From 2db963713372342d253291f6625292f25fafb981 Mon Sep 17 00:00:00 2001 From: fumimowdan Date: Mon, 4 Sep 2023 15:36:58 +0100 Subject: [PATCH] Add Student loan to stading data CSV --- app/models/reports/standing_data.rb | 5 +++-- spec/models/reports/standing_data_spec.rb | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/models/reports/standing_data.rb b/app/models/reports/standing_data.rb index 46dac875..046e01e9 100644 --- a/app/models/reports/standing_data.rb +++ b/app/models/reports/standing_data.rb @@ -29,6 +29,7 @@ def rows "email_address", "address_line_1", "postcode", + "applicants.student_loan", ) end @@ -50,13 +51,13 @@ def header %w[ URN Forename - Middle - Name + Middle_name Surname Telephone Email Address Postcode + Student_loan ] end end diff --git a/spec/models/reports/standing_data_spec.rb b/spec/models/reports/standing_data_spec.rb index 61f59fac..263e8916 100644 --- a/spec/models/reports/standing_data_spec.rb +++ b/spec/models/reports/standing_data_spec.rb @@ -63,6 +63,7 @@ module Reports application.applicant.email_address, application.applicant.address.address_line_1, application.applicant.address.postcode, + application.applicant.student_loan, ].join(",")) end @@ -70,13 +71,13 @@ module Reports expected_header = %w[ URN Forename - Middle - Name + Middle_name Surname Telephone Email Address Postcode + Student_loan ].join(",") expect(report.csv).to include(expected_header)