diff --git a/.rubocop.yml b/.rubocop.yml index 9e23adcb..ca15931c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -75,6 +75,7 @@ RSpec/ExampleLength: Max: 10 Exclude: - 'spec/features/*' + - 'spec/models/reports/home_office_spec.rb' RSpec/NoExpectationExample: Exclude: diff --git a/app/models/reports/home_office.rb b/app/models/reports/home_office.rb index e54f2db8..8a581657 100644 --- a/app/models/reports/home_office.rb +++ b/app/models/reports/home_office.rb @@ -25,10 +25,15 @@ def rows application.urn, application.applicant.full_name, application.applicant.date_of_birth, + nil, application.applicant.nationality, + nil, application.applicant.passport_number, nil, nil, + nil, + nil, + nil, ] end end @@ -49,13 +54,18 @@ def applications def header [ - "URN", + "ID", "Full Name", "DOB", + "Gender", "Nationality", + "Place of Birth", "Passport Number", - "Visa Type", - "Date of UK entry", + "Address", + "Postcode", + "Email", + "Telephone", + "Reference", ] end end diff --git a/spec/models/reports/home_office_spec.rb b/spec/models/reports/home_office_spec.rb index 88405791..01475058 100644 --- a/spec/models/reports/home_office_spec.rb +++ b/spec/models/reports/home_office_spec.rb @@ -55,22 +55,32 @@ module Reports application.urn, application.applicant.full_name, application.applicant.date_of_birth, + nil, application.applicant.nationality, + nil, application.applicant.passport_number, nil, nil, + nil, + nil, + nil, ].join(",")) end it "returns the header in CSV format" do expected_header = [ - "URN", + "ID", "Full Name", "DOB", + "Gender", "Nationality", + "Place of Birth", "Passport Number", - "Visa Type", - "Date of UK entry", + "Address", + "Postcode", + "Email", + "Telephone", + "Reference", ].join(",") expect(report.csv).to include(expected_header)