|
21 | 21 | # Church of England school |
22 | 22 | osmaston_cofe = School.find_by!(urn: "112847") |
23 | 23 |
|
| 24 | +# academy special converter |
| 25 | +oakwoods = School.find_by!(urn: "139468") |
| 26 | +# community special school |
| 27 | +northcott = School.find_by!(urn: "118138") |
| 28 | +# Special free school |
| 29 | +martinbacon = School.find_by!(urn: "147661") |
| 30 | + |
24 | 31 | # Team users |
25 | 32 | users = [ |
26 | 33 | { email: "alex.lee@education.gov.uk", family_name: "Lee", given_name: "Alex" }, |
|
48 | 55 | southampton_la.schools.detect { |s| s.phase != "not_applicable" && s.phase.exclude?("middle") }, |
49 | 56 | abraham_moss, |
50 | 57 | st_anthony, |
| 58 | + oakwoods, |
| 59 | + northcott, |
| 60 | + martinbacon, |
51 | 61 | osmaston_cofe] |
52 | 62 |
|
53 | 63 | user_emails = users.map { |u| u.fetch(:email) } |
|
65 | 75 |
|
66 | 76 | schools.each do |school| |
67 | 77 | attrs = { organisations: [school], |
68 | | - phases: [school.phase], |
| 78 | + phases: (school.phase == "not_applicable" ? %w[secondary] : [school.phase]), |
69 | 79 | publisher_organisation: school, |
70 | 80 | publisher: Publisher.all.sample } |
71 | | - 3.times { FactoryBot.create(:vacancy, :for_seed_data, **attrs) } |
| 81 | + 2.times { FactoryBot.create(:vacancy, :for_seed_data, **attrs) } |
72 | 82 | FactoryBot.create(:vacancy, :for_seed_data, :no_tv_applications, **attrs) |
73 | | - 2.times { FactoryBot.create(:vacancy, :for_seed_data, :future_publish, **attrs) } |
| 83 | + FactoryBot.create(:vacancy, :for_seed_data, :future_publish, **attrs) |
74 | 84 | FactoryBot.create(:draft_vacancy, :for_seed_data, **attrs) |
75 | | - 2.times { FactoryBot.build(:vacancy, :for_seed_data, :expired, **attrs).save(validate: false) } |
| 85 | + FactoryBot.build(:vacancy, :for_seed_data, :expired, **attrs).save(validate: false) |
76 | 86 | end |
77 | 87 |
|
78 | 88 | # Vacancies at Weydon trust central office |
|
0 commit comments