-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
34 additions
and
8 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,40 @@ module Degrees | |
let(:trainee) { create(:trainee) } | ||
let(:degree) { trainee.degrees.first } | ||
let(:csv_row) do | ||
CSV.read( | ||
file_fixture("hpitt_degree_import.csv").to_path, | ||
headers: true, | ||
encoding: "ISO-8859-1", | ||
header_converters: ->(f) { f&.strip }, | ||
).first | ||
{ "Provider trainee ID" => "A2", | ||
"Region" => "London", | ||
"First names" => "Adam", | ||
"Middle names" => nil, | ||
"Last names" => "Test", | ||
"Date of birth" => "21/09/1997", | ||
"Sex" => "Male", | ||
"Nationality" => "british", | ||
"UK address: Line 1" => "99 Lovely Road", | ||
"UK address: Line 2" => nil, | ||
"UK address: town or city" => "Oxford", | ||
"UK Address 1: Postcode" => "OX41RG", | ||
"Outside UK address" => nil, | ||
"Email" => "[email protected]", | ||
"Ethnicity" => "White - English, Scottish, Welsh, Northern Irish or British", | ||
"Disabilities" => "Not provided", | ||
"Course level" => nil, | ||
"Course education phase" => "Secondary", | ||
"Course age range" => "11 to 16", | ||
"Course ITT subject 1" => "Mathematics", | ||
"Course ITT subject 2" => nil, | ||
"Course ITT Subject 3" => nil, | ||
"Course study mode" => "full-time", | ||
"Course ITT start date" => "2022-09-09", | ||
"Course Expected End Date" => "31/07/2023", | ||
"Trainee start date" => "09/09/2022", | ||
"Employing school URN" => "131609", | ||
"Degree: country" => "United Kingdom", | ||
"Degree: subjects" => "Philosophy, Politics, Economics", | ||
"Degree: UK degree types" => "Bachelor of Arts", | ||
"Degree: UK awarding institution" => "University of Oxford", | ||
"Degree: UK grade" => "Upper second-class honours (2:1)", | ||
"Degree: Non-UK degree types" => nil, | ||
"Degree: graduation year" => "2018" } | ||
end | ||
|
||
describe "#call" do | ||
|