Skip to content

Commit dae0327

Browse files
committed
Add mapping, fix test data
1 parent 508b66f commit dae0327

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

app/jobs/school_import_job.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ def build_school_params(school_data)
128128
creator_agree_authority: true,
129129
creator_agree_terms_and_conditions: true,
130130
creator_agree_responsible_safeguarding: true,
131-
user_origin: 'experience_cs'
131+
user_origin: 'experience_cs',
132+
district_name: school_data[:district_name],
133+
district_nces_id: school_data[:district_nces_id],
134+
school_roll_number: school_data[:school_roll_number]
132135
}.compact
133136
end
134137

spec/jobs/school_import_job_spec.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@
1717
address_line_1: '123 Main St',
1818
municipality: 'Springfield',
1919
country_code: 'US',
20-
owner_email: 'owner1@example.com'
20+
owner_email: 'owner1@example.com',
21+
district_nces_id: '010000000001'
2122
},
2223
{
2324
name: 'Test School 2',
2425
website: 'https://test2.example.com',
2526
address_line_1: '456 Oak Ave',
2627
municipality: 'Boston',
2728
country_code: 'US',
28-
owner_email: 'owner2@example.com'
29+
owner_email: 'owner2@example.com',
30+
district_nces_id: '010000000002'
2931
}
3032
]
3133
end
@@ -124,7 +126,8 @@
124126
'address_line_1' => '123 Main St',
125127
'municipality' => 'Springfield',
126128
'country_code' => 'us',
127-
'owner_email' => 'owner1@example.com'
129+
'owner_email' => 'owner1@example.com',
130+
'district_nces_id' => '010000000001'
128131
}
129132
]
130133
end

0 commit comments

Comments
 (0)