Skip to content

Commit

Permalink
feature/56550 Persist Establishment Type during GIAS import (#2444)
Browse files Browse the repository at this point in the history
* toe code importing

* dynamic add during import

* final tweaks to capture id of inserted estabType

* fix test

* persisting toe tests

---------

Co-authored-by: Jon Shipley <[email protected]>
Co-authored-by: Mohsen Qureshi <[email protected]>
Co-authored-by: Mohsen Qureshi <[email protected]>
  • Loading branch information
4 people authored Feb 13, 2023
1 parent a5e2054 commit 9ba2f51
Show file tree
Hide file tree
Showing 15 changed files with 217 additions and 79 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ test/admin-hpa/data/fixtures/test-check-form-*.csv
test/admin-hpa/data/multiple_pupils_errors.csv
test/admin-hpa/data/fixtures/test-check-form-*.txt
test/admin-hpa/data/multiple_pupils_template.csv
test/admin-hpa/data/new_toe.csv

# azure function settings files
local.settings.json
Expand Down
2 changes: 1 addition & 1 deletion test/admin-hpa/data/null-estab-data.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
URN,LA (code),EstablishmentNumber,EstablishmentName,StatutoryLowAge,StatutoryHighAge,EstablishmentStatus (code),EstablishmentTypeGroup (code),TypeOfEstablishment (code)
URN,LA (code),EstablishmentNumber,EstablishmentName,StatutoryLowAge,StatutoryHighAge,EstablishmentStatus (code),EstablishmentTypeGroup (code),TypeOfEstablishment (code),TypeOfEstablishment (name)
99600,999,,Mo School 1,8,10,1,4,7
99601,999,,Mo School 2,8,10,1,4,12
2 changes: 1 addition & 1 deletion test/admin-hpa/data/null-leacode-data.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
URN,LA (code),EstablishmentNumber,EstablishmentName,StatutoryLowAge,StatutoryHighAge,EstablishmentStatus (code),EstablishmentTypeGroup (code),TypeOfEstablishment (code)
URN,LA (code),EstablishmentNumber,EstablishmentName,StatutoryLowAge,StatutoryHighAge,EstablishmentStatus (code),EstablishmentTypeGroup (code),TypeOfEstablishment (code),TypeOfEstablishment (name)
99600,,9000,Mo School 1,8,10,1,4,7
99601,,9001,Mo School 2,8,10,1,4,12
2 changes: 1 addition & 1 deletion test/admin-hpa/data/null-names-data.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
URN,LA (code),EstablishmentNumber,EstablishmentName,StatutoryLowAge,StatutoryHighAge,EstablishmentStatus (code),EstablishmentTypeGroup (code),TypeOfEstablishment (code)
URN,LA (code),EstablishmentNumber,EstablishmentName,StatutoryLowAge,StatutoryHighAge,EstablishmentStatus (code),EstablishmentTypeGroup (code),TypeOfEstablishment (code),TypeOfEstablishment (name)
99600,999,9000,,8,10,1,4,7
99601,999,9001,,8,10,1,4,12
2 changes: 1 addition & 1 deletion test/admin-hpa/data/null-urn-data.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
URN,LA (code),EstablishmentNumber,EstablishmentName,StatutoryLowAge,StatutoryHighAge,EstablishmentStatus (code),EstablishmentTypeGroup (code),TypeOfEstablishment (code)
URN,LA (code),EstablishmentNumber,EstablishmentName,StatutoryLowAge,StatutoryHighAge,EstablishmentStatus (code),EstablishmentTypeGroup (code),TypeOfEstablishment (code),TypeOfEstablishment (name)
,999,9000,Mo School 1,8,10,1,4,7
,999,9001,Mo School 2,8,10,1,4,12
114 changes: 57 additions & 57 deletions test/admin-hpa/data/school-data.csv
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
URN,LA (code),EstablishmentNumber,EstablishmentName,StatutoryLowAge,StatutoryHighAge,EstablishmentStatus (code),EstablishmentTypeGroup (code),TypeOfEstablishment (code)
99600,999,9000,Mo School 1,8,10,1,4,7
99601,999,9001,Mo School 2,8,10,1,4,12
99602,999,9002,Mo School 3,8,10,1,4,26
99603,999,9003,Mo School 4,8,10,1,4,25
99604,999,9004,Mo School 5,8,10,2,4,7
99605,999,9005,Mo School 6,8,10,2,4,12
99606,999,9006,Mo School 7,8,10,2,4,26
99607,999,9007,Mo School 8,8,10,2,4,25
99608,999,9008,Mo School 9,8,10,3,4,7
99609,999,9009,Mo School 10,8,10,3,4,12
99610,999,9010,Mo School 11,8,10,3,4,26
99611,999,9011,Mo School 12,8,10,3,4,25
99612,999,9012,Mo School 13,8,10,4,4,7
99613,999,9013,Mo School 14,8,10,4,4,12
99614,999,9014,Mo School 15,8,10,4,4,26
99615,999,9015,Mo School 16,8,10,4,4,25
99616,999,9016,Mo School 17,8,10,1,5,7
99617,999,9017,Mo School 18,8,10,1,5,12
99618,999,9018,Mo School 19,8,10,2,5,7
99619,999,9019,Mo School 20,8,10,2,5,12
99620,999,9020,Mo School 21,8,10,3,5,7
99621,999,9021,Mo School 22,8,10,3,5,12
99622,999,9022,Mo School 23,8,10,4,5,7
99623,999,9023,Mo School 24,8,10,4,5,12
99624,999,9024,Mo School 25,8,10,1,10,7
99625,999,9025,Mo School 26,8,10,1,10,12
99626,999,9026,Mo School 27,8,10,1,10,26
99627,999,9027,Mo School 28,8,10,1,10,25
99628,999,9028,Mo School 29,8,10,2,10,7
99629,999,9029,Mo School 30,8,10,2,10,12
99630,999,9030,Mo School 31,8,10,2,10,26
99631,999,9031,Mo School 32,8,10,2,10,25
99632,999,9032,Mo School 33,8,10,3,10,7
99633,999,9033,Mo School 34,8,10,3,10,12
99634,999,9034,Mo School 35,8,10,3,10,26
99635,999,9035,Mo School 36,8,10,3,10,25
99636,999,9036,Mo School 37,8,10,4,10,7
99637,999,9037,Mo School 38,8,10,4,10,12
99638,999,9038,Mo School 39,8,10,4,10,26
99639,999,9039,Mo School 40,8,10,4,10,25
99640,999,9040,Mo School 41,8,10,1,11,7
99641,999,9041,Mo School 42,8,10,1,11,12
99642,999,9042,Mo School 43,8,10,1,11,26
99643,999,9043,Mo School 44,8,10,1,11,25
99644,999,9044,Mo School 45,8,10,2,11,7
99645,999,9045,Mo School 46,8,10,2,11,12
99646,999,9046,Mo School 47,8,10,2,11,26
99647,999,9047,Mo School 48,8,10,2,11,25
99648,999,9048,Mo School 49,8,10,3,11,7
99649,999,9049,Mo School 50,8,10,3,11,12
99650,999,9050,Mo School 51,8,10,3,11,26
99651,999,9051,Mo School 52,8,10,3,11,25
99652,999,9052,Mo School 53,8,10,4,11,7
99653,999,9053,Mo School 54,8,10,4,11,12
99654,999,9054,Mo School 55,8,10,4,11,26
99655,999,9055,Mo School 56,8,10,4,11,25
URN,LA (code),EstablishmentNumber,EstablishmentName,StatutoryLowAge,StatutoryHighAge,EstablishmentStatus (code),EstablishmentTypeGroup (code),TypeOfEstablishment (code),TypeOfEstablishment (name)
99600,999,9000,Mo School 1,8,10,1,4,7,Community special school
99601,999,9001,Mo School 2,8,10,1,4,12,Foundation special school
99602,999,9002,Mo School 3,8,10,1,4,26,Service children's education
99603,999,9003,Mo School 4,8,10,1,4,25,Offshore schools
99604,999,9004,Mo School 5,8,10,2,4,7,Community special school
99605,999,9005,Mo School 6,8,10,2,4,12,Foundation special school
99606,999,9006,Mo School 7,8,10,2,4,26,Service children's education
99607,999,9007,Mo School 8,8,10,2,4,25,Offshore schools
99608,999,9008,Mo School 9,8,10,3,4,7,Community special school
99609,999,9009,Mo School 10,8,10,3,4,12,Foundation special school
99610,999,9010,Mo School 11,8,10,3,4,26,Service children's education
99611,999,9011,Mo School 12,8,10,3,4,25,Offshore schools
99612,999,9012,Mo School 13,8,10,4,4,7,Community special school
99613,999,9013,Mo School 14,8,10,4,4,12,Foundation special school
99614,999,9014,Mo School 15,8,10,4,4,26,Service children's education
99615,999,9015,Mo School 16,8,10,4,4,25,Offshore schools
99616,999,9016,Mo School 17,8,10,1,5,7,Community special school
99617,999,9017,Mo School 18,8,10,1,5,12,Foundation special school
99618,999,9018,Mo School 19,8,10,2,5,7,Community special school
99619,999,9019,Mo School 20,8,10,2,5,12,Foundation special school
99620,999,9020,Mo School 21,8,10,3,5,7,Community special school
99621,999,9021,Mo School 22,8,10,3,5,12,Foundation special school
99622,999,9022,Mo School 23,8,10,4,5,7,Community special school
99623,999,9023,Mo School 24,8,10,4,5,12,Foundation special school
99624,999,9024,Mo School 25,8,10,1,10,7,Community special school
99625,999,9025,Mo School 26,8,10,1,10,12,Foundation special school
99626,999,9026,Mo School 27,8,10,1,10,26,Service children's education
99627,999,9027,Mo School 28,8,10,1,10,25,Offshore schools
99628,999,9028,Mo School 29,8,10,2,10,7,Community special school
99629,999,9029,Mo School 30,8,10,2,10,12,Foundation special school
99630,999,9030,Mo School 31,8,10,2,10,26,Service children's education
99631,999,9031,Mo School 32,8,10,2,10,25,Offshore schools
99632,999,9032,Mo School 33,8,10,3,10,7,Community special school
99633,999,9033,Mo School 34,8,10,3,10,12,Foundation special school
99634,999,9034,Mo School 35,8,10,3,10,26,Service children's education
99635,999,9035,Mo School 36,8,10,3,10,25,Offshore schools
99636,999,9036,Mo School 37,8,10,4,10,7,Community special school
99637,999,9037,Mo School 38,8,10,4,10,12,Foundation special school
99638,999,9038,Mo School 39,8,10,4,10,26,Service children's education
99639,999,9039,Mo School 40,8,10,4,10,25,Offshore schools
99640,999,9040,Mo School 41,8,10,1,11,7,Community special school
99641,999,9041,Mo School 42,8,10,1,11,12,Foundation special school
99642,999,9042,Mo School 43,8,10,1,11,26,Service children's education
99643,999,9043,Mo School 44,8,10,1,11,25,Offshore schools
99644,999,9044,Mo School 45,8,10,2,11,7,Community special school
99645,999,9045,Mo School 46,8,10,2,11,12,Foundation special school
99646,999,9046,Mo School 47,8,10,2,11,26,Service children's education
99647,999,9047,Mo School 48,8,10,2,11,25,Offshore schools
99648,999,9048,Mo School 49,8,10,3,11,7,Community special school
99649,999,9049,Mo School 50,8,10,3,11,12,Foundation special school
99650,999,9050,Mo School 51,8,10,3,11,26,Service children's education
99651,999,9051,Mo School 52,8,10,3,11,25,Offshore schools
99652,999,9052,Mo School 53,8,10,4,11,7,Community special school
99653,999,9053,Mo School 54,8,10,4,11,12,Foundation special school
99654,999,9054,Mo School 55,8,10,4,11,26,Service children's education
99655,999,9055,Mo School 56,8,10,4,11,25,Offshore schools
8 changes: 8 additions & 0 deletions test/admin-hpa/features/school_import.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@ Feature:
Scenario: School name can not be null
Given I attempt to import using a csv file that has school name set to null
Then I should get an error stating that school name can not be null

Scenario: TOE code is persisted during school import
Given I have imported a csv with schools
Then I should see each imported school with a TOE code

Scenario: New TOE codes are persisted during school import
Given I have imported a csv with schools with a new TOE code
Then I should see the new TOE code persisted
12 changes: 11 additions & 1 deletion test/admin-hpa/features/step_definitions/add_school_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
expect(add_school_page.error_summary.error_messages.map {|a| a.text}.sort).to eql ["Unknown LEA code: 100"]
end


When(/^I submit a duplicate value for urn number$/) do
school = SqlDbHelper.get_schools_list[5]
@name = 'New school ' + rand(934753).to_s
Expand Down Expand Up @@ -90,3 +89,14 @@
expect(add_school_page.error_summary.error_messages.map {|a| a.text}.sort).to eql ["The dfeNumber must be 7 digits"]
expect(add_school_page.error_messages.map {|a| a.text}.sort).to eql ["The dfeNumber must be 7 digits"]
end


When(/^I submit valid values for a new school with a new toe code$/) do
add_school_page.school_name.set 'New school ' + rand(934753).to_s
add_school_page.dfe_number.set SqlDbHelper.get_list_of_la_codes[30] + rand.to_s[2..5]
@urn = rand.to_s[2..5]
add_school_page.urn.set @urn
@toe = SqlDbHelper.type_of_establishment.sample
add_school_page.type_of_establishment.select @toe
add_school_page.add_school.click
end
42 changes: 40 additions & 2 deletions test/admin-hpa/features/step_definitions/school_import_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

Given(/^I have imported a csv with schools including duplicates$/) do
CSV.open(File.expand_path("#{File.dirname(__FILE__)}/../../data/duplicate_and_new_school.csv"), 'wb') do |csv_object|
csv_object << ["URN","LA (code)","EstablishmentNumber","EstablishmentName","StatutoryLowAge","StatutoryHighAge","EstablishmentStatus (code)","EstablishmentTypeGroup (code)","TypeOfEstablishment (code)"]
csv_object << ["URN","LA (code)","EstablishmentNumber","EstablishmentName","StatutoryLowAge","StatutoryHighAge","EstablishmentStatus (code)","EstablishmentTypeGroup (code)","TypeOfEstablishment (code)",'TypeOfEstablishment (name)']
csv_object << [(SqlDbHelper.get_schools_list.map {|school| school['urn']}.sort.first).to_s, "999","9000","Mo School 1","8","10","1","4","7"]
csv_object << [(SqlDbHelper.get_schools_list.map {|school| school['urn']}.sort.last + 1).to_s, "999",(SqlDbHelper.get_schools_list.map {|school| school['estabCode']}.sort.last+1).to_s,"Mo School 55","8","10","1","11","26"]
end
Expand Down Expand Up @@ -90,7 +90,7 @@
destination = File.expand_path("#{File.dirname(__FILE__)}/../../data/download")
wait_until {File.exist? zip_path}
output_hash = upload_organisations_page.extract_job_output(zip_path, destination)
expect(output_hash[:error].map {|x| x.split('Z ').last}).to include 'Headers "URN", "LA (code)", "EstablishmentNumber", "EstablishmentName", "StatutoryLowAge", "StatutoryHighAge", "EstablishmentStatus (code)", "TypeOfEstablishment (code)", "EstablishmentTypeGroup (code)" not found'
expect(output_hash[:error].map {|x| x.split('Z ').last}).to include "Headers \"URN\", \"LA (code)\", \"EstablishmentNumber\", \"EstablishmentName\", \"TypeOfEstablishment (code)\", \"TypeOfEstablishment (name)\", \"StatutoryLowAge\", \"StatutoryHighAge\", \"EstablishmentStatus (code)\", \"EstablishmentTypeGroup (code)\" not found"
end

Given(/^I attempt to import using a csv file that has leaCode set to null$/) do
Expand Down Expand Up @@ -191,3 +191,41 @@
expect(output_hash[:output].map {|x| x.split('Z ').last}).to include "school records excluded in filtering:2. No records to persist, exiting."
end


Then(/^I should see each imported school with a TOE code$/) do
@urns_and_toe = CSV.parse(File.read(@school_import)).map {|z| [z[0],z[8], z[9]] unless z[6] == '2' || z[6] == '4' || z[0] == 'URN' }.compact
Timeout.timeout(ENV['WAIT_TIME'].to_i) {sleep 1 until !SqlDbHelper.find_school_by_urn(@urns_and_toe.last[0]).nil?}
@urns_and_toe.each do |urn|
school = SqlDbHelper.find_school_by_urn(urn[0])
expect(school).to_not be_nil
toe_name = SqlDbHelper.find_type_of_establishment_by_code(urn[1])['name']
expect(urn[2]).to eql toe_name
end
end


Given(/^I have imported a csv with schools with a new TOE code$/) do
@new_toe_code = SqlDbHelper.type_of_establishment.last.split('(').last.delete(')').to_i + 1
@new_toe_name = "Test TOE name #{rand(2344)}"
CSV.open(File.expand_path("#{File.dirname(__FILE__)}/../../data/new_toe.csv"), 'wb') do |csv_object|
csv_object << ["URN","LA (code)","EstablishmentNumber","EstablishmentName","StatutoryLowAge","StatutoryHighAge","EstablishmentStatus (code)","EstablishmentTypeGroup (code)","TypeOfEstablishment (code)",'TypeOfEstablishment (name)']
csv_object << [(SqlDbHelper.get_schools_list.map {|school| school['urn']}.sort.last + 1).to_s, "999",(SqlDbHelper.get_schools_list.map {|school| school['estabCode']}.sort.last+1).to_s,"Mo School 55","8","10","1","11",@new_toe_code, @new_toe_name]
end
@school_import = File.expand_path("#{File.dirname(__FILE__)}/../../data/new_toe.csv")
@urn = CSV.parse(File.read(@school_import)).map {|z| z[0] unless z[6] == '2' || z[6] == '4' || z[0] == 'URN' }.compact
step 'I have signed in with service-manager'
admin_page.school_search.click
manage_organisations_page.upload.click
upload_organisations_page.upload_schools(@school_import)
upload_organisations_page.upload.click
Timeout.timeout(ENV['WAIT_TIME'].to_i) {sleep 1 until !SqlDbHelper.find_school_by_urn(@urn.first).nil?}
end


Then(/^I should see the new TOE code persisted$/) do
school = SqlDbHelper.find_school_by_urn(@urn.first)
toe_record = SqlDbHelper.find_type_of_establishment_by_id(school['typeOfEstablishmentLookup_id'])
expect(toe_record['code']).to eql @new_toe_code
expect(toe_record['name']).to eql @new_toe_name

end
18 changes: 18 additions & 0 deletions test/admin-hpa/features/support/sql_db_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,24 @@ def self.find_type_of_establishment(name)
pupil_details_res
end

def self.find_type_of_establishment_by_code(code)
sql = "select * from mtc_admin.typeOfEstablishmentLookup where code='#{code}'"
result = SQL_CLIENT.execute(sql)
pupil_details_res = result.first
result.cancel
pupil_details_res
end


def self.find_type_of_establishment_by_id(id)
sql = "select * from mtc_admin.typeOfEstablishmentLookup where id='#{id}'"
result = SQL_CLIENT.execute(sql)
pupil_details_res = result.first
result.cancel
pupil_details_res
end


def self.pupil_audit_record(pupil_id)
sql = "SELECT * FROM [mtc_admin].[pupilAudit] WHERE pupil_id='#{pupil_id}'"
result = SQL_CLIENT.execute(sql)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export interface ISchoolRecord {
estabCode: number | undefined
estabTypeGroupCode: EstabTypeGroupCode
estabTypeCode: EstabTypeCode
estabTypeName: string
estabStatusCode: EstabStatusCode
statLowAge?: number
statHighAge?: number
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as mssql from 'mssql'
import * as R from 'ramda'
import { ILogger } from '../../../common/logger'
import { SchoolImportJobOutput } from '../SchoolImportJobOutput'
import { ISchoolRecord } from './ISchoolRecord'
Expand All @@ -23,6 +24,10 @@ export class SchoolDataService implements ISchoolDataService {
this.jobResult.stderr.push(`${(new Date()).toISOString()} school-import: ${msg}`)
}

private logInfo (msg: string): void {
this.jobResult.stdout.push(`${(new Date()).toISOString()} school-import: ${msg}`)
}

/**
* Perform a bulk upload to the school table, inserting new schools
* @param context - function context object
Expand Down Expand Up @@ -66,17 +71,68 @@ export class SchoolDataService implements ISchoolDataService {
return this.jobResult
}

private async getExistingEstabTypes (): Promise<Array<Record<string, number>>> {
const sql = `SELECT [id], [code]
FROM
[mtc_admin].[typeOfEstablishmentLookup] `
const request = new mssql.Request(this.pool)
const sqlResult = await request.query(sql)
const recordset = sqlResult.recordset
const estabTypes = recordset.map(rec => {
const x: Record<string, number> = {
id: rec.id,
code: rec.code
}
return x
})
return estabTypes
}

private async getEstabTypeId (estabTypeCode: number, estabTypeName: string, existingEstabTypes: Array<Record<string, number>>): Promise<number> {
const estabTypeEntry = R.find(R.propEq('code', estabTypeCode), existingEstabTypes)
if (estabTypeEntry === undefined) {
this.logInfo(`no estabType found with code ${estabTypeCode}, attempting to add...`)
const newId = await this.addEstabType(estabTypeCode, estabTypeName)
existingEstabTypes.push({
id: newId,
code: estabTypeCode
})
return newId
}
return estabTypeEntry.id
}

private async addEstabType (estabTypeCode: number, estabTypeName: string): Promise<number> {
this.logInfo(`adding new estabType. code:${estabTypeCode} name:${estabTypeName}.`)
const sql = `
INSERT mtc_admin.[typeOfEstablishmentLookup] ([name], [code])
VALUES (@name, @code);
SELECT SCOPE_IDENTITY() AS [insertedId]`
const request = new mssql.Request(this.pool)
request.input('name', mssql.TYPES.NVarChar(50), estabTypeName)
request.input('code', mssql.TYPES.Int, estabTypeCode)
request.output('insertedId', mssql.TYPES.Int)
const result = await request.query(sql)
const id = result.recordset[0].insertedId
this.logInfo(`inserted estabType. id is ${id}`)
return id
}

async individualUpload (schoolData: ISchoolRecord[]): Promise<SchoolImportJobOutput> {
const sql = `INSERT [mtc_admin].[school] (dfeNumber, estabCode, leaCode, name, urn)
VALUES (@dfeNumber, @estabCode, @leaCode, @name, @urn)`
const toeCodes = await this.getExistingEstabTypes()
const sql = `
INSERT [mtc_admin].[school] (dfeNumber, estabCode, leaCode, name, urn, typeOfEstablishmentLookup_id)
VALUES (@dfeNumber, @estabCode, @leaCode, @name, @urn, @toeCodeId);`
for (let index = 0; index < schoolData.length; index++) {
const request = new mssql.Request(this.pool)
const school = schoolData[index]
const toeCodeId = await this.getEstabTypeId(school.estabTypeCode, school.estabTypeName, toeCodes)
const request = new mssql.Request(this.pool)
request.input('dfeNumber', mssql.TYPES.Int, `${school.leaCode}${school.estabCode}`)
request.input('estabCode', mssql.TYPES.Int, school.estabCode)
request.input('leaCode', mssql.TYPES.Int, school.leaCode)
request.input('name', mssql.TYPES.NVarChar(mssql.MAX), school.name)
request.input('urn', mssql.TYPES.Int, school.urn)
request.input('toeCodeId', mssql.TYPES.Int, toeCodeId)
try {
await request.query(sql)
this.logger.info(`school imported. urn:${school.urn}`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ describe('School Import Predicates', () => {
estabTypeCode: EstabTypeCode.communitySpecialSchool,
estabStatusCode: EstabStatusCode.Open,
statLowAge: targetAge - 1,
statHighAge: targetAge + 1
statHighAge: targetAge + 1,
estabTypeName: 'x'
}
})

Expand Down Expand Up @@ -202,7 +203,8 @@ describe('School Import Predicates', () => {
estabTypeGroupCode: EstabTypeGroupCode.localAuthorityMaintainedSchool,
leaCode: 743,
name: 'school',
urn: 12345
urn: 12345,
estabTypeName: 'x'
}
})
test('returns false when estabCode is empty', () => {
Expand Down
Loading

0 comments on commit 9ba2f51

Please sign in to comment.