Skip to content

Commit

Permalink
Add Student loan to stading data CSV
Browse files Browse the repository at this point in the history
  • Loading branch information
fumimowdan committed Sep 11, 2023
1 parent 441494a commit 2db9637
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions app/models/reports/standing_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def rows
"email_address",
"address_line_1",
"postcode",
"applicants.student_loan",
)
end

Expand All @@ -50,13 +51,13 @@ def header
%w[
URN
Forename
Middle
Name
Middle_name
Surname
Telephone
Email
Address
Postcode
Student_loan
]
end
end
Expand Down
5 changes: 3 additions & 2 deletions spec/models/reports/standing_data_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,21 @@ module Reports
application.applicant.email_address,
application.applicant.address.address_line_1,
application.applicant.address.postcode,
application.applicant.student_loan,
].join(","))
end

it "returns the header in CSV format" do
expected_header = %w[
URN
Forename
Middle
Name
Middle_name
Surname
Telephone
Email
Address
Postcode
Student_loan
].join(",")

expect(report.csv).to include(expected_header)
Expand Down

0 comments on commit 2db9637

Please sign in to comment.