Browse Source

Update LAs for 23/24 sales questions

pull/1392/head
Kat 4 years ago
parent
commit
5283019b64
  1. 780
      app/models/form/sales/questions/prevloc.rb
  2. 646
      app/models/form/sales/questions/property_local_authority.rb
  3. 3
      spec/models/form/sales/pages/last_accommodation_la_spec.rb
  4. 3
      spec/models/form/sales/pages/property_local_authority_spec.rb
  5. 1162
      spec/models/form/sales/questions/prevloc_spec.rb
  6. 961
      spec/models/form/sales/questions/property_local_authority_spec.rb

780
app/models/form/sales/questions/prevloc.rb

@ -5,7 +5,7 @@ class Form::Sales::Questions::Prevloc < ::Form::Question
@check_answer_label = "Local authority of buyer 1’s last settled accommodation" @check_answer_label = "Local authority of buyer 1’s last settled accommodation"
@header = "Select a local authority" @header = "Select a local authority"
@type = "select" @type = "select"
@answer_options = ANSWER_OPTIONS @answer_options = answer_options
@inferred_check_answers_value = [{ @inferred_check_answers_value = [{
"condition" => { "condition" => {
"previous_la_known" => 0, "previous_la_known" => 0,
@ -14,390 +14,396 @@ class Form::Sales::Questions::Prevloc < ::Form::Question
}] }]
end end
ANSWER_OPTIONS = { def answer_options
"" => "Select an option", {
"S12000033" => "Aberdeen City", "" => "Select an option",
"S12000034" => "Aberdeenshire", "S12000033" => "Aberdeen City",
"E07000223" => "Adur", "S12000034" => "Aberdeenshire",
"E07000026" => "Allerdale", "E07000223" => "Adur",
"E07000032" => "Amber Valley", "E07000026" => ("Allerdale" if form.start_date.year < 2023),
"S12000041" => "Angus", "E07000032" => "Amber Valley",
"N09000001" => "Antrim and Newtownabbey", "S12000041" => "Angus",
"N09000011" => "Ards and North Down", "N09000001" => "Antrim and Newtownabbey",
"S12000035" => "Argyll and Bute", "N09000011" => "Ards and North Down",
"N09000002" => "Armagh City, Banbridge and Craigavon", "S12000035" => "Argyll and Bute",
"E07000224" => "Arun", "N09000002" => "Armagh City, Banbridge and Craigavon",
"E07000170" => "Ashfield", "E07000224" => "Arun",
"E07000105" => "Ashford", "E07000170" => "Ashfield",
"E07000200" => "Babergh", "E07000105" => "Ashford",
"E09000002" => "Barking and Dagenham", "E07000200" => "Babergh",
"E09000003" => "Barnet", "E09000002" => "Barking and Dagenham",
"E08000016" => "Barnsley", "E09000003" => "Barnet",
"E07000027" => "Barrow-in-Furness", "E08000016" => "Barnsley",
"E07000066" => "Basildon", "E07000027" => ("Barrow-in-Furness" if form.start_date.year < 2023),
"E07000084" => "Basingstoke and Deane", "E07000066" => "Basildon",
"E07000171" => "Bassetlaw", "E07000084" => "Basingstoke and Deane",
"E06000022" => "Bath and North East Somerset", "E07000171" => "Bassetlaw",
"E06000055" => "Bedford", "E06000022" => "Bath and North East Somerset",
"N09000003" => "Belfast", "E06000055" => "Bedford",
"E09000004" => "Bexley", "N09000003" => "Belfast",
"E08000025" => "Birmingham", "E09000004" => "Bexley",
"E07000129" => "Blaby", "E08000025" => "Birmingham",
"E06000008" => "Blackburn with Darwen", "E07000129" => "Blaby",
"E06000009" => "Blackpool", "E06000008" => "Blackburn with Darwen",
"W06000019" => "Blaenau Gwent", "E06000009" => "Blackpool",
"E07000033" => "Bolsover", "W06000019" => "Blaenau Gwent",
"E08000001" => "Bolton", "E07000033" => "Bolsover",
"E07000136" => "Boston", "E08000001" => "Bolton",
"E06000058" => "Bournemouth, Christchurch and Poole", "E07000136" => "Boston",
"E06000036" => "Bracknell Forest", "E06000058" => "Bournemouth, Christchurch and Poole",
"E08000032" => "Bradford", "E06000036" => "Bracknell Forest",
"E07000067" => "Braintree", "E08000032" => "Bradford",
"E07000143" => "Breckland", "E07000067" => "Braintree",
"E09000005" => "Brent", "E07000143" => "Breckland",
"E07000068" => "Brentwood", "E09000005" => "Brent",
"W06000013" => "Bridgend", "E07000068" => "Brentwood",
"E06000043" => "Brighton and Hove", "W06000013" => "Bridgend",
"E06000023" => "Bristol, City of", "E06000043" => "Brighton and Hove",
"E07000144" => "Broadland", "E06000023" => "Bristol, City of",
"E09000006" => "Bromley", "E07000144" => "Broadland",
"E07000234" => "Bromsgrove", "E09000006" => "Bromley",
"E07000095" => "Broxbourne", "E07000234" => "Bromsgrove",
"E07000172" => "Broxtowe", "E07000095" => "Broxbourne",
"E06000060" => "Buckinghamshire", "E07000172" => "Broxtowe",
"E07000117" => "Burnley", "E06000060" => "Buckinghamshire",
"E08000002" => "Bury", "E07000117" => "Burnley",
"W06000018" => "Caerphilly", "E08000002" => "Bury",
"E08000033" => "Calderdale", "W06000018" => "Caerphilly",
"E07000008" => "Cambridge", "E08000033" => "Calderdale",
"E09000007" => "Camden", "E07000008" => "Cambridge",
"E07000192" => "Cannock Chase", "E09000007" => "Camden",
"E07000106" => "Canterbury", "E07000192" => "Cannock Chase",
"W06000015" => "Cardiff", "E07000106" => "Canterbury",
"E07000028" => "Carlisle", "W06000015" => "Cardiff",
"W06000010" => "Carmarthenshire", "E07000028" => ("Carlisle" if form.start_date.year < 2023),
"E07000069" => "Castle Point", "W06000010" => "Carmarthenshire",
"N09000004" => "Causeway Coast and Glens", "E07000069" => "Castle Point",
"E06000056" => "Central Bedfordshire", "N09000004" => "Causeway Coast and Glens",
"W06000008" => "Ceredigion", "E06000056" => "Central Bedfordshire",
"E07000130" => "Charnwood", "W06000008" => "Ceredigion",
"E07000070" => "Chelmsford", "E07000130" => "Charnwood",
"E07000078" => "Cheltenham", "E07000070" => "Chelmsford",
"E07000177" => "Cherwell", "E07000078" => "Cheltenham",
"E06000049" => "Cheshire East", "E07000177" => "Cherwell",
"E06000050" => "Cheshire West and Chester", "E06000049" => "Cheshire East",
"E07000034" => "Chesterfield", "E06000050" => "Cheshire West and Chester",
"E07000225" => "Chichester", "E07000034" => "Chesterfield",
"E07000118" => "Chorley", "E07000225" => "Chichester",
"S12000036" => "City of Edinburgh", "E07000118" => "Chorley",
"E09000001" => "City of London", "S12000036" => "City of Edinburgh",
"S12000005" => "Clackmannanshire", "E09000001" => "City of London",
"E07000071" => "Colchester", "S12000005" => "Clackmannanshire",
"W06000003" => "Conwy", "E07000071" => "Colchester",
"E07000029" => "Copeland", "W06000003" => "Conwy",
"E07000150" => "Corby", "E07000029" => ("Copeland" if form.start_date.year < 2023),
"E06000052" => "Cornwall", "E07000150" => "Corby",
"E07000079" => "Cotswold", "E06000052" => "Cornwall",
"E06000047" => "County Durham", "E07000079" => "Cotswold",
"E08000026" => "Coventry", "E06000047" => "County Durham",
"E07000163" => "Craven", "E08000026" => "Coventry",
"E07000226" => "Crawley", "E07000163" => ("Craven" if form.start_date.year < 2023),
"E09000008" => "Croydon", "E07000226" => "Crawley",
"E07000096" => "Dacorum", "E09000008" => "Croydon",
"E06000005" => "Darlington", "E06000063" => ("Cumberland" if form.start_date.year >= 2023),
"E07000107" => "Dartford", "E07000096" => "Dacorum",
"E07000151" => "Daventry", "E06000005" => "Darlington",
"W06000004" => "Denbighshire", "E07000107" => "Dartford",
"E06000015" => "Derby", "E07000151" => "Daventry",
"E07000035" => "Derbyshire Dales", "W06000004" => "Denbighshire",
"N09000005" => "Derry City and Strabane", "E06000015" => "Derby",
"E08000017" => "Doncaster", "E07000035" => "Derbyshire Dales",
"E06000059" => "Dorset", "N09000005" => "Derry City and Strabane",
"E07000108" => "Dover", "E08000017" => "Doncaster",
"E08000027" => "Dudley", "E06000059" => "Dorset",
"S12000006" => "Dumfries and Galloway", "E07000108" => "Dover",
"S12000042" => "Dundee City", "E08000027" => "Dudley",
"E09000009" => "Ealing", "S12000006" => "Dumfries and Galloway",
"S12000008" => "East Ayrshire", "S12000042" => "Dundee City",
"E07000009" => "East Cambridgeshire", "E09000009" => "Ealing",
"E07000040" => "East Devon", "S12000008" => "East Ayrshire",
"S12000045" => "East Dunbartonshire", "E07000009" => "East Cambridgeshire",
"E07000085" => "East Hampshire", "E07000040" => "East Devon",
"E07000242" => "East Hertfordshire", "S12000045" => "East Dunbartonshire",
"E07000137" => "East Lindsey", "E07000085" => "East Hampshire",
"S12000010" => "East Lothian", "E07000242" => "East Hertfordshire",
"E07000152" => "East Northamptonshire", "E07000137" => "East Lindsey",
"S12000011" => "East Renfrewshire", "S12000010" => "East Lothian",
"E06000011" => "East Riding of Yorkshire", "E07000152" => "East Northamptonshire",
"E07000193" => "East Staffordshire", "S12000011" => "East Renfrewshire",
"E07000244" => "East Suffolk", "E06000011" => "East Riding of Yorkshire",
"E07000061" => "Eastbourne", "E07000193" => "East Staffordshire",
"E07000086" => "Eastleigh", "E07000244" => "East Suffolk",
"E07000030" => "Eden", "E07000061" => "Eastbourne",
"E07000207" => "Elmbridge", "E07000086" => "Eastleigh",
"E09000010" => "Enfield", "E07000030" => ("Eden" if form.start_date.year < 2023),
"E07000072" => "Epping Forest", "E07000207" => "Elmbridge",
"E07000208" => "Epsom and Ewell", "E09000010" => "Enfield",
"E07000036" => "Erewash", "E07000072" => "Epping Forest",
"E07000041" => "Exeter", "E07000208" => "Epsom and Ewell",
"S12000014" => "Falkirk", "E07000036" => "Erewash",
"E07000087" => "Fareham", "E07000041" => "Exeter",
"E07000010" => "Fenland", "S12000014" => "Falkirk",
"N09000006" => "Fermanagh and Omagh", "E07000087" => "Fareham",
"S12000047" => "Fife", "E07000010" => "Fenland",
"W06000005" => "Flintshire", "N09000006" => "Fermanagh and Omagh",
"E07000112" => "Folkestone and Hythe", "S12000047" => "Fife",
"E07000080" => "Forest of Dean", "W06000005" => "Flintshire",
"E07000119" => "Fylde", "E07000112" => "Folkestone and Hythe",
"E08000037" => "Gateshead", "E07000080" => "Forest of Dean",
"E07000173" => "Gedling", "E07000119" => "Fylde",
"S12000049" => "Glasgow City", "E08000037" => "Gateshead",
"E07000081" => "Gloucester", "E07000173" => "Gedling",
"E07000088" => "Gosport", "S12000049" => "Glasgow City",
"E07000109" => "Gravesham", "E07000081" => "Gloucester",
"E07000145" => "Great Yarmouth", "E07000088" => "Gosport",
"E09000011" => "Greenwich", "E07000109" => "Gravesham",
"E07000209" => "Guildford", "E07000145" => "Great Yarmouth",
"W06000002" => "Gwynedd", "E09000011" => "Greenwich",
"E09000012" => "Hackney", "E07000209" => "Guildford",
"E06000006" => "Halton", "W06000002" => "Gwynedd",
"E07000164" => "Hambleton", "E09000012" => "Hackney",
"E09000013" => "Hammersmith and Fulham", "E06000006" => "Halton",
"E07000131" => "Harborough", "E07000164" => ("Hambleton" if form.start_date.year < 2023),
"E09000014" => "Haringey", "E09000013" => "Hammersmith and Fulham",
"E07000073" => "Harlow", "E07000131" => "Harborough",
"E07000165" => "Harrogate", "E09000014" => "Haringey",
"E09000015" => "Harrow", "E07000073" => "Harlow",
"E07000089" => "Hart", "E07000165" => ("Harrogate" if form.start_date.year < 2023),
"E06000001" => "Hartlepool", "E09000015" => "Harrow",
"E07000062" => "Hastings", "E07000089" => "Hart",
"E07000090" => "Havant", "E06000001" => "Hartlepool",
"E09000016" => "Havering", "E07000062" => "Hastings",
"E06000019" => "Herefordshire, County of", "E07000090" => "Havant",
"E07000098" => "Hertsmere", "E09000016" => "Havering",
"E07000037" => "High Peak", "E06000019" => "Herefordshire, County of",
"S12000017" => "Highland", "E07000098" => "Hertsmere",
"E09000017" => "Hillingdon", "E07000037" => "High Peak",
"E07000132" => "Hinckley and Bosworth", "S12000017" => "Highland",
"E07000227" => "Horsham", "E09000017" => "Hillingdon",
"E09000018" => "Hounslow", "E07000132" => "Hinckley and Bosworth",
"E07000011" => "Huntingdonshire", "E07000227" => "Horsham",
"E07000120" => "Hyndburn", "E09000018" => "Hounslow",
"S12000018" => "Inverclyde", "E07000011" => "Huntingdonshire",
"E07000202" => "Ipswich", "E07000120" => "Hyndburn",
"W06000001" => "Isle of Anglesey", "S12000018" => "Inverclyde",
"E06000046" => "Isle of Wight", "E07000202" => "Ipswich",
"E06000053" => "Isles of Scilly", "W06000001" => "Isle of Anglesey",
"E09000019" => "Islington", "E06000046" => "Isle of Wight",
"E09000020" => "Kensington and Chelsea", "E06000053" => "Isles of Scilly",
"E07000153" => "Kettering", "E09000019" => "Islington",
"E07000146" => "King’s Lynn and West Norfolk", "E09000020" => "Kensington and Chelsea",
"E06000010" => "Kingston upon Hull, City of", "E07000153" => "Kettering",
"E09000021" => "Kingston upon Thames", "E07000146" => "King’s Lynn and West Norfolk",
"E08000034" => "Kirklees", "E06000010" => "Kingston upon Hull, City of",
"E08000011" => "Knowsley", "E09000021" => "Kingston upon Thames",
"E09000022" => "Lambeth", "E08000034" => "Kirklees",
"E07000121" => "Lancaster", "E08000011" => "Knowsley",
"E08000035" => "Leeds", "E09000022" => "Lambeth",
"E06000016" => "Leicester", "E07000121" => "Lancaster",
"E07000063" => "Lewes", "E08000035" => "Leeds",
"E09000023" => "Lewisham", "E06000016" => "Leicester",
"E07000194" => "Lichfield", "E07000063" => "Lewes",
"E07000138" => "Lincoln", "E09000023" => "Lewisham",
"N09000007" => "Lisburn and Castlereagh", "E07000194" => "Lichfield",
"E08000012" => "Liverpool", "E07000138" => "Lincoln",
"E06000032" => "Luton", "N09000007" => "Lisburn and Castlereagh",
"E07000110" => "Maidstone", "E08000012" => "Liverpool",
"E07000074" => "Maldon", "E06000032" => "Luton",
"E07000235" => "Malvern Hills", "E07000110" => "Maidstone",
"E08000003" => "Manchester", "E07000074" => "Maldon",
"E07000174" => "Mansfield", "E07000235" => "Malvern Hills",
"E06000035" => "Medway", "E08000003" => "Manchester",
"E07000133" => "Melton", "E07000174" => "Mansfield",
"E07000187" => "Mendip", "E06000035" => "Medway",
"W06000024" => "Merthyr Tydfil", "E07000133" => "Melton",
"E09000024" => "Merton", "E07000187" => ("Mendip" if form.start_date.year < 2023),
"E07000042" => "Mid Devon", "W06000024" => "Merthyr Tydfil",
"E07000203" => "Mid Suffolk", "E09000024" => "Merton",
"E07000228" => "Mid Sussex", "E07000042" => "Mid Devon",
"N09000009" => "Mid Ulster", "E07000203" => "Mid Suffolk",
"N09000008" => "Mid and East Antrim", "E07000228" => "Mid Sussex",
"E06000002" => "Middlesbrough", "N09000009" => "Mid Ulster",
"S12000019" => "Midlothian", "N09000008" => "Mid and East Antrim",
"E06000042" => "Milton Keynes", "E06000002" => "Middlesbrough",
"E07000210" => "Mole Valley", "S12000019" => "Midlothian",
"W06000021" => "Monmouthshire", "E06000042" => "Milton Keynes",
"S12000020" => "Moray", "E07000210" => "Mole Valley",
"S12000013" => "Na h-Eileanan Siar", "W06000021" => "Monmouthshire",
"W06000012" => "Neath Port Talbot", "S12000020" => "Moray",
"E07000091" => "New Forest", "S12000013" => "Na h-Eileanan Siar",
"E07000175" => "Newark and Sherwood", "W06000012" => "Neath Port Talbot",
"E08000021" => "Newcastle upon Tyne", "E07000091" => "New Forest",
"E07000195" => "Newcastle-under-Lyme", "E07000175" => "Newark and Sherwood",
"E09000025" => "Newham", "E08000021" => "Newcastle upon Tyne",
"W06000022" => "Newport", "E07000195" => "Newcastle-under-Lyme",
"N09000010" => "Newry, Mourne and Down", "E09000025" => "Newham",
"S12000021" => "North Ayrshire", "W06000022" => "Newport",
"E07000043" => "North Devon", "N09000010" => "Newry, Mourne and Down",
"E07000038" => "North East Derbyshire", "S12000021" => "North Ayrshire",
"E06000012" => "North East Lincolnshire", "E07000043" => "North Devon",
"E07000099" => "North Hertfordshire", "E07000038" => "North East Derbyshire",
"E07000139" => "North Kesteven", "E06000012" => "North East Lincolnshire",
"S12000050" => "North Lanarkshire", "E07000099" => "North Hertfordshire",
"E06000013" => "North Lincolnshire", "E07000139" => "North Kesteven",
"E07000147" => "North Norfolk", "S12000050" => "North Lanarkshire",
"E06000024" => "North Somerset", "E06000013" => "North Lincolnshire",
"E08000022" => "North Tyneside", "E07000147" => "North Norfolk",
"E07000218" => "North Warwickshire", "E06000024" => "North Somerset",
"E07000134" => "North West Leicestershire", "E08000022" => "North Tyneside",
"E07000154" => "Northampton", "E07000218" => "North Warwickshire",
"E06000057" => "Northumberland", "E07000134" => "North West Leicestershire",
"E07000148" => "Norwich", "E07000154" => "Northampton",
"E06000018" => "Nottingham", "E06000057" => "Northumberland",
"E07000219" => "Nuneaton and Bedworth", "E07000148" => "Norwich",
"E07000135" => "Oadby and Wigston", "E06000018" => "Nottingham",
"E08000004" => "Oldham", "E07000219" => "Nuneaton and Bedworth",
"S12000023" => "Orkney Islands", "E07000135" => "Oadby and Wigston",
"E07000178" => "Oxford", "E08000004" => "Oldham",
"W06000009" => "Pembrokeshire", "S12000023" => "Orkney Islands",
"E07000122" => "Pendle", "E07000178" => "Oxford",
"S12000048" => "Perth and Kinross", "W06000009" => "Pembrokeshire",
"E06000031" => "Peterborough", "E07000122" => "Pendle",
"E06000026" => "Plymouth", "S12000048" => "Perth and Kinross",
"E06000044" => "Portsmouth", "E06000031" => "Peterborough",
"W06000023" => "Powys", "E06000026" => "Plymouth",
"E07000123" => "Preston", "E06000044" => "Portsmouth",
"E06000038" => "Reading", "W06000023" => "Powys",
"E09000026" => "Redbridge", "E07000123" => "Preston",
"E06000003" => "Redcar and Cleveland", "E06000038" => "Reading",
"E07000236" => "Redditch", "E09000026" => "Redbridge",
"E07000211" => "Reigate and Banstead", "E06000003" => "Redcar and Cleveland",
"S12000038" => "Renfrewshire", "E07000236" => "Redditch",
"W06000016" => "Rhondda Cynon Taf", "E07000211" => "Reigate and Banstead",
"E07000124" => "Ribble Valley", "S12000038" => "Renfrewshire",
"E09000027" => "Richmond upon Thames", "W06000016" => "Rhondda Cynon Taf",
"E07000166" => "Richmondshire", "E07000124" => "Ribble Valley",
"E08000005" => "Rochdale", "E09000027" => "Richmond upon Thames",
"E07000075" => "Rochford", "E07000166" => ("Richmondshire" if form.start_date.year < 2023),
"E07000125" => "Rossendale", "E08000005" => "Rochdale",
"E07000064" => "Rother", "E07000075" => "Rochford",
"E08000018" => "Rotherham", "E07000125" => "Rossendale",
"E07000220" => "Rugby", "E07000064" => "Rother",
"E07000212" => "Runnymede", "E08000018" => "Rotherham",
"E07000176" => "Rushcliffe", "E07000220" => "Rugby",
"E07000092" => "Rushmoor", "E07000212" => "Runnymede",
"E06000017" => "Rutland", "E07000176" => "Rushcliffe",
"E07000167" => "Ryedale", "E07000092" => "Rushmoor",
"E08000006" => "Salford", "E06000017" => "Rutland",
"E08000028" => "Sandwell", "E07000167" => ("Ryedale" if form.start_date.year < 2023),
"E07000168" => "Scarborough", "E08000006" => "Salford",
"S12000026" => "Scottish Borders", "E08000028" => "Sandwell",
"E07000188" => "Sedgemoor", "E07000168" => ("Scarborough" if form.start_date.year < 2023),
"E08000014" => "Sefton", "S12000026" => "Scottish Borders",
"E07000169" => "Selby", "E07000188" => ("Sedgemoor" if form.start_date.year < 2023),
"E07000111" => "Sevenoaks", "E08000014" => "Sefton",
"E08000019" => "Sheffield", "E07000169" => ("Selby" if form.start_date.year < 2023),
"S12000027" => "Shetland Islands", "E07000111" => "Sevenoaks",
"E06000051" => "Shropshire", "E08000019" => "Sheffield",
"E06000039" => "Slough", "S12000027" => "Shetland Islands",
"E08000029" => "Solihull", "E06000051" => "Shropshire",
"E07000246" => "Somerset West and Taunton", "E06000039" => "Slough",
"S12000028" => "South Ayrshire", "E08000029" => "Solihull",
"E07000012" => "South Cambridgeshire", "E06000066" => ("Somerset" if form.start_date.year >= 2023),
"E07000039" => "South Derbyshire", "E07000246" => ("Somerset West and Taunton" if form.start_date.year < 2023),
"E06000025" => "South Gloucestershire", "S12000028" => "South Ayrshire",
"E07000044" => "South Hams", "E07000012" => "South Cambridgeshire",
"E07000140" => "South Holland", "E07000039" => "South Derbyshire",
"E07000141" => "South Kesteven", "E06000025" => "South Gloucestershire",
"E07000031" => "South Lakeland", "E07000044" => "South Hams",
"S12000029" => "South Lanarkshire", "E07000140" => "South Holland",
"E07000149" => "South Norfolk", "E07000141" => "South Kesteven",
"E07000155" => "South Northamptonshire", "E07000031" => ("South Lakeland" if form.start_date.year < 2023),
"E07000179" => "South Oxfordshire", "S12000029" => "South Lanarkshire",
"E07000126" => "South Ribble", "E07000149" => "South Norfolk",
"E07000189" => "South Somerset", "E07000155" => "South Northamptonshire",
"E07000196" => "South Staffordshire", "E07000179" => "South Oxfordshire",
"E08000023" => "South Tyneside", "E07000126" => "South Ribble",
"E06000045" => "Southampton", "E07000189" => ("South Somerset" if form.start_date.year < 2023),
"E06000033" => "Southend-on-Sea", "E07000196" => "South Staffordshire",
"E09000028" => "Southwark", "E08000023" => "South Tyneside",
"E07000213" => "Spelthorne", "E06000045" => "Southampton",
"E07000240" => "St Albans", "E06000033" => "Southend-on-Sea",
"E08000013" => "St. Helens", "E09000028" => "Southwark",
"E07000197" => "Stafford", "E07000213" => "Spelthorne",
"E07000198" => "Staffordshire Moorlands", "E07000240" => "St Albans",
"E07000243" => "Stevenage", "E08000013" => "St. Helens",
"S12000030" => "Stirling", "E07000197" => "Stafford",
"E08000007" => "Stockport", "E07000198" => "Staffordshire Moorlands",
"E06000004" => "Stockton-on-Tees", "E07000243" => "Stevenage",
"E06000021" => "Stoke-on-Trent", "S12000030" => "Stirling",
"E07000221" => "Stratford-on-Avon", "E08000007" => "Stockport",
"E07000082" => "Stroud", "E06000004" => "Stockton-on-Tees",
"E08000024" => "Sunderland", "E06000021" => "Stoke-on-Trent",
"E07000214" => "Surrey Heath", "E07000221" => "Stratford-on-Avon",
"E09000029" => "Sutton", "E07000082" => "Stroud",
"E07000113" => "Swale", "E08000024" => "Sunderland",
"W06000011" => "Swansea", "E07000214" => "Surrey Heath",
"E06000030" => "Swindon", "E09000029" => "Sutton",
"E08000008" => "Tameside", "E07000113" => "Swale",
"E07000199" => "Tamworth", "W06000011" => "Swansea",
"E07000215" => "Tandridge", "E06000030" => "Swindon",
"E07000045" => "Teignbridge", "E08000008" => "Tameside",
"E06000020" => "Telford and Wrekin", "E07000199" => "Tamworth",
"E07000076" => "Tendring", "E07000215" => "Tandridge",
"E07000093" => "Test Valley", "E07000045" => "Teignbridge",
"E07000083" => "Tewkesbury", "E06000020" => "Telford and Wrekin",
"E07000114" => "Thanet", "E07000076" => "Tendring",
"E07000102" => "Three Rivers", "E07000093" => "Test Valley",
"E06000034" => "Thurrock", "E07000083" => "Tewkesbury",
"E07000115" => "Tonbridge and Malling", "E07000114" => "Thanet",
"E06000027" => "Torbay", "E07000102" => "Three Rivers",
"W06000020" => "Torfaen", "E06000034" => "Thurrock",
"E07000046" => "Torridge", "E07000115" => "Tonbridge and Malling",
"E09000030" => "Tower Hamlets", "E06000027" => "Torbay",
"E08000009" => "Trafford", "W06000020" => "Torfaen",
"E07000116" => "Tunbridge Wells", "E07000046" => "Torridge",
"E07000077" => "Uttlesford", "E09000030" => "Tower Hamlets",
"W06000014" => "Vale of Glamorgan", "E08000009" => "Trafford",
"E07000180" => "Vale of White Horse", "E07000116" => "Tunbridge Wells",
"E08000036" => "Wakefield", "E07000077" => "Uttlesford",
"E08000030" => "Walsall", "W06000014" => "Vale of Glamorgan",
"E09000031" => "Waltham Forest", "E07000180" => "Vale of White Horse",
"E09000032" => "Wandsworth", "E08000036" => "Wakefield",
"E06000007" => "Warrington", "E08000030" => "Walsall",
"E07000222" => "Warwick", "E09000031" => "Waltham Forest",
"E07000103" => "Watford", "E09000032" => "Wandsworth",
"E07000216" => "Waverley", "E06000007" => "Warrington",
"E07000065" => "Wealden", "E07000222" => "Warwick",
"E07000156" => "Wellingborough", "E07000103" => "Watford",
"E07000241" => "Welwyn Hatfield", "E07000216" => "Waverley",
"E06000037" => "West Berkshire", "E07000065" => "Wealden",
"E07000047" => "West Devon", "E07000156" => "Wellingborough",
"S12000039" => "West Dunbartonshire", "E07000241" => "Welwyn Hatfield",
"E07000127" => "West Lancashire", "E06000037" => "West Berkshire",
"E07000142" => "West Lindsey", "E07000047" => "West Devon",
"S12000040" => "West Lothian", "S12000039" => "West Dunbartonshire",
"E07000181" => "West Oxfordshire", "E07000127" => "West Lancashire",
"E07000245" => "West Suffolk", "E07000142" => "West Lindsey",
"E09000033" => "Westminster", "S12000040" => "West Lothian",
"E08000010" => "Wigan", "E07000181" => "West Oxfordshire",
"E06000054" => "Wiltshire", "E07000245" => "West Suffolk",
"E07000094" => "Winchester", "E09000033" => "Westminster",
"E06000040" => "Windsor and Maidenhead", "E06000064" => ("Westmorland and Furness" if form.start_date.year >= 2023),
"E08000015" => "Wirral", "E08000010" => "Wigan",
"E07000217" => "Woking", "E06000054" => "Wiltshire",
"E06000041" => "Wokingham", "E07000094" => "Winchester",
"E08000031" => "Wolverhampton", "E06000040" => "Windsor and Maidenhead",
"E07000237" => "Worcester", "E08000015" => "Wirral",
"E07000229" => "Worthing", "E07000217" => "Woking",
"W06000006" => "Wrexham", "E06000041" => "Wokingham",
"E07000238" => "Wychavon", "E08000031" => "Wolverhampton",
"E07000128" => "Wyre", "E07000237" => "Worcester",
"E07000239" => "Wyre Forest", "E07000229" => "Worthing",
"E06000014" => "York", "W06000006" => "Wrexham",
"N92000002" => "Northern Ireland", "E07000238" => "Wychavon",
"S92000003" => "Scotland", "E07000128" => "Wyre",
"W92000004" => "Wales", "E07000239" => "Wyre Forest",
"9300000XX" => "Outside UK", "E06000014" => "York",
}.freeze "E06000065" => ("North Yorkshire" if form.start_date.year >= 2023),
"N92000002" => "Northern Ireland",
"S92000003" => "Scotland",
"W92000004" => "Wales",
"9300000XX" => "Outside UK",
}.compact
end
end end

646
app/models/form/sales/questions/property_local_authority.rb

@ -5,326 +5,332 @@ class Form::Sales::Questions::PropertyLocalAuthority < ::Form::Question
@check_answer_label = "Local authority" @check_answer_label = "Local authority"
@header = "What is the local authority of the property?" @header = "What is the local authority of the property?"
@type = "select" @type = "select"
@answer_options = ANSWER_OPTIONS @answer_options = answer_options
end end
ANSWER_OPTIONS = { def answer_options
"" => "Select an option", {
"E07000223" => "Adur", "" => "Select an option",
"E07000026" => "Allerdale", "E07000223" => "Adur",
"E07000032" => "Amber Valley", "E07000026" => ("Allerdale" if form.start_date.year < 2023),
"E07000224" => "Arun", "E07000032" => "Amber Valley",
"E07000170" => "Ashfield", "E07000224" => "Arun",
"E07000105" => "Ashford", "E07000170" => "Ashfield",
"E07000200" => "Babergh", "E07000105" => "Ashford",
"E09000002" => "Barking and Dagenham", "E07000200" => "Babergh",
"E09000003" => "Barnet", "E09000002" => "Barking and Dagenham",
"E08000016" => "Barnsley", "E09000003" => "Barnet",
"E07000027" => "Barrow-in-Furness", "E08000016" => "Barnsley",
"E07000066" => "Basildon", "E07000027" => ("Barrow-in-Furness" if form.start_date.year < 2023),
"E07000084" => "Basingstoke and Deane", "E07000066" => "Basildon",
"E07000171" => "Bassetlaw", "E07000084" => "Basingstoke and Deane",
"E06000022" => "Bath and North East Somerset", "E07000171" => "Bassetlaw",
"E06000055" => "Bedford", "E06000022" => "Bath and North East Somerset",
"E09000004" => "Bexley", "E06000055" => "Bedford",
"E08000025" => "Birmingham", "E09000004" => "Bexley",
"E07000129" => "Blaby", "E08000025" => "Birmingham",
"E06000008" => "Blackburn with Darwen", "E07000129" => "Blaby",
"E06000009" => "Blackpool", "E06000008" => "Blackburn with Darwen",
"E07000033" => "Bolsover", "E06000009" => "Blackpool",
"E08000001" => "Bolton", "E07000033" => "Bolsover",
"E07000136" => "Boston", "E08000001" => "Bolton",
"E06000058" => "Bournemouth, Christchurch and Poole", "E07000136" => "Boston",
"E06000036" => "Bracknell Forest", "E06000058" => "Bournemouth, Christchurch and Poole",
"E08000032" => "Bradford", "E06000036" => "Bracknell Forest",
"E07000067" => "Braintree", "E08000032" => "Bradford",
"E07000143" => "Breckland", "E07000067" => "Braintree",
"E09000005" => "Brent", "E07000143" => "Breckland",
"E07000068" => "Brentwood", "E09000005" => "Brent",
"E06000043" => "Brighton and Hove", "E07000068" => "Brentwood",
"E06000023" => "Bristol, City of", "E06000043" => "Brighton and Hove",
"E07000144" => "Broadland", "E06000023" => "Bristol, City of",
"E09000006" => "Bromley", "E07000144" => "Broadland",
"E07000234" => "Bromsgrove", "E09000006" => "Bromley",
"E07000095" => "Broxbourne", "E07000234" => "Bromsgrove",
"E07000172" => "Broxtowe", "E07000095" => "Broxbourne",
"E06000060" => "Buckinghamshire", "E07000172" => "Broxtowe",
"E07000117" => "Burnley", "E06000060" => "Buckinghamshire",
"E08000002" => "Bury", "E07000117" => "Burnley",
"E08000033" => "Calderdale", "E08000002" => "Bury",
"E07000008" => "Cambridge", "E08000033" => "Calderdale",
"E09000007" => "Camden", "E07000008" => "Cambridge",
"E07000192" => "Cannock Chase", "E09000007" => "Camden",
"E07000106" => "Canterbury", "E07000192" => "Cannock Chase",
"E07000028" => "Carlisle", "E07000106" => "Canterbury",
"E07000069" => "Castle Point", "E07000028" => ("Carlisle" if form.start_date.year < 2023),
"E06000056" => "Central Bedfordshire", "E07000069" => "Castle Point",
"E07000130" => "Charnwood", "E06000056" => "Central Bedfordshire",
"E07000070" => "Chelmsford", "E07000130" => "Charnwood",
"E07000078" => "Cheltenham", "E07000070" => "Chelmsford",
"E07000177" => "Cherwell", "E07000078" => "Cheltenham",
"E06000049" => "Cheshire East", "E07000177" => "Cherwell",
"E06000050" => "Cheshire West and Chester", "E06000049" => "Cheshire East",
"E07000034" => "Chesterfield", "E06000050" => "Cheshire West and Chester",
"E07000225" => "Chichester", "E07000034" => "Chesterfield",
"E07000118" => "Chorley", "E07000225" => "Chichester",
"E09000001" => "City of London", "E07000118" => "Chorley",
"E07000071" => "Colchester", "E09000001" => "City of London",
"E07000029" => "Copeland", "E07000071" => "Colchester",
"E07000150" => "Corby", "E07000029" => ("Copeland" if form.start_date.year < 2023),
"E06000052" => "Cornwall", "E07000150" => "Corby",
"E07000079" => "Cotswold", "E06000052" => "Cornwall",
"E06000047" => "County Durham", "E07000079" => "Cotswold",
"E08000026" => "Coventry", "E06000047" => "County Durham",
"E07000163" => "Craven", "E08000026" => "Coventry",
"E07000226" => "Crawley", "E07000163" => ("Craven" if form.start_date.year < 2023),
"E09000008" => "Croydon", "E07000226" => "Crawley",
"E07000096" => "Dacorum", "E09000008" => "Croydon",
"E06000005" => "Darlington", "E06000063" => ("Cumberland" if form.start_date.year >= 2023),
"E07000107" => "Dartford", "E07000096" => "Dacorum",
"E07000151" => "Daventry", "E06000005" => "Darlington",
"E06000015" => "Derby", "E07000107" => "Dartford",
"E07000035" => "Derbyshire Dales", "E07000151" => "Daventry",
"E08000017" => "Doncaster", "E06000015" => "Derby",
"E06000059" => "Dorset", "E07000035" => "Derbyshire Dales",
"E07000108" => "Dover", "E08000017" => "Doncaster",
"E08000027" => "Dudley", "E06000059" => "Dorset",
"E09000009" => "Ealing", "E07000108" => "Dover",
"E07000009" => "East Cambridgeshire", "E08000027" => "Dudley",
"E07000040" => "East Devon", "E09000009" => "Ealing",
"E07000085" => "East Hampshire", "E07000009" => "East Cambridgeshire",
"E07000242" => "East Hertfordshire", "E07000040" => "East Devon",
"E07000137" => "East Lindsey", "E07000085" => "East Hampshire",
"E07000152" => "East Northamptonshire", "E07000242" => "East Hertfordshire",
"E06000011" => "East Riding of Yorkshire", "E07000137" => "East Lindsey",
"E07000193" => "East Staffordshire", "E07000152" => "East Northamptonshire",
"E07000244" => "East Suffolk", "E06000011" => "East Riding of Yorkshire",
"E07000061" => "Eastbourne", "E07000193" => "East Staffordshire",
"E07000086" => "Eastleigh", "E07000244" => "East Suffolk",
"E07000030" => "Eden", "E07000061" => "Eastbourne",
"E07000207" => "Elmbridge", "E07000086" => "Eastleigh",
"E09000010" => "Enfield", "E07000030" => ("Eden" if form.start_date.year < 2023),
"E07000072" => "Epping Forest", "E07000207" => "Elmbridge",
"E07000208" => "Epsom and Ewell", "E09000010" => "Enfield",
"E07000036" => "Erewash", "E07000072" => "Epping Forest",
"E07000041" => "Exeter", "E07000208" => "Epsom and Ewell",
"E07000087" => "Fareham", "E07000036" => "Erewash",
"E07000010" => "Fenland", "E07000041" => "Exeter",
"E07000112" => "Folkestone and Hythe", "E07000087" => "Fareham",
"E07000080" => "Forest of Dean", "E07000010" => "Fenland",
"E07000119" => "Fylde", "E07000112" => "Folkestone and Hythe",
"E08000037" => "Gateshead", "E07000080" => "Forest of Dean",
"E07000173" => "Gedling", "E07000119" => "Fylde",
"E07000081" => "Gloucester", "E08000037" => "Gateshead",
"E07000088" => "Gosport", "E07000173" => "Gedling",
"E07000109" => "Gravesham", "E07000081" => "Gloucester",
"E07000145" => "Great Yarmouth", "E07000088" => "Gosport",
"E09000011" => "Greenwich", "E07000109" => "Gravesham",
"E07000209" => "Guildford", "E07000145" => "Great Yarmouth",
"W06000002" => "Gwynedd", "E09000011" => "Greenwich",
"E09000012" => "Hackney", "E07000209" => "Guildford",
"E06000006" => "Halton", "W06000002" => "Gwynedd",
"E07000164" => "Hambleton", "E09000012" => "Hackney",
"E09000013" => "Hammersmith and Fulham", "E06000006" => "Halton",
"E07000131" => "Harborough", "E07000164" => ("Hambleton" if form.start_date.year < 2023),
"E09000014" => "Haringey", "E09000013" => "Hammersmith and Fulham",
"E07000073" => "Harlow", "E07000131" => "Harborough",
"E07000165" => "Harrogate", "E09000014" => "Haringey",
"E09000015" => "Harrow", "E07000073" => "Harlow",
"E07000089" => "Hart", "E07000165" => ("Harrogate" if form.start_date.year < 2023),
"E06000001" => "Hartlepool", "E09000015" => "Harrow",
"E07000062" => "Hastings", "E07000089" => "Hart",
"E07000090" => "Havant", "E06000001" => "Hartlepool",
"E09000016" => "Havering", "E07000062" => "Hastings",
"E06000019" => "Herefordshire, County of", "E07000090" => "Havant",
"E07000098" => "Hertsmere", "E09000016" => "Havering",
"E07000037" => "High Peak", "E06000019" => "Herefordshire, County of",
"S12000017" => "Highland", "E07000098" => "Hertsmere",
"E09000017" => "Hillingdon", "E07000037" => "High Peak",
"E07000132" => "Hinckley and Bosworth", "S12000017" => "Highland",
"E07000227" => "Horsham", "E09000017" => "Hillingdon",
"E09000018" => "Hounslow", "E07000132" => "Hinckley and Bosworth",
"E07000011" => "Huntingdonshire", "E07000227" => "Horsham",
"E07000120" => "Hyndburn", "E09000018" => "Hounslow",
"E07000202" => "Ipswich", "E07000011" => "Huntingdonshire",
"E06000046" => "Isle of Wight", "E07000120" => "Hyndburn",
"E06000053" => "Isles of Scilly", "E07000202" => "Ipswich",
"E09000019" => "Islington", "E06000046" => "Isle of Wight",
"E09000020" => "Kensington and Chelsea", "E06000053" => "Isles of Scilly",
"E07000153" => "Kettering", "E09000019" => "Islington",
"E07000146" => "King’s Lynn and West Norfolk", "E09000020" => "Kensington and Chelsea",
"E06000010" => "Kingston upon Hull, City of", "E07000153" => "Kettering",
"E09000021" => "Kingston upon Thames", "E07000146" => "King’s Lynn and West Norfolk",
"E08000034" => "Kirklees", "E06000010" => "Kingston upon Hull, City of",
"E08000011" => "Knowsley", "E09000021" => "Kingston upon Thames",
"E09000022" => "Lambeth", "E08000034" => "Kirklees",
"E07000121" => "Lancaster", "E08000011" => "Knowsley",
"E08000035" => "Leeds", "E09000022" => "Lambeth",
"E06000016" => "Leicester", "E07000121" => "Lancaster",
"E07000063" => "Lewes", "E08000035" => "Leeds",
"E09000023" => "Lewisham", "E06000016" => "Leicester",
"E07000194" => "Lichfield", "E07000063" => "Lewes",
"E07000138" => "Lincoln", "E09000023" => "Lewisham",
"E08000012" => "Liverpool", "E07000194" => "Lichfield",
"E06000032" => "Luton", "E07000138" => "Lincoln",
"E07000110" => "Maidstone", "E08000012" => "Liverpool",
"E07000074" => "Maldon", "E06000032" => "Luton",
"E07000235" => "Malvern Hills", "E07000110" => "Maidstone",
"E08000003" => "Manchester", "E07000074" => "Maldon",
"E07000174" => "Mansfield", "E07000235" => "Malvern Hills",
"E06000035" => "Medway", "E08000003" => "Manchester",
"E07000133" => "Melton", "E07000174" => "Mansfield",
"E07000187" => "Mendip", "E06000035" => "Medway",
"E09000024" => "Merton", "E07000133" => "Melton",
"E07000042" => "Mid Devon", "E07000187" => ("Mendip" if form.start_date.year < 2023),
"E07000203" => "Mid Suffolk", "E09000024" => "Merton",
"E07000228" => "Mid Sussex", "E07000042" => "Mid Devon",
"E06000002" => "Middlesbrough", "E07000203" => "Mid Suffolk",
"E06000042" => "Milton Keynes", "E07000228" => "Mid Sussex",
"E07000210" => "Mole Valley", "E06000002" => "Middlesbrough",
"E07000091" => "New Forest", "E06000042" => "Milton Keynes",
"E07000175" => "Newark and Sherwood", "E07000210" => "Mole Valley",
"E08000021" => "Newcastle upon Tyne", "E07000091" => "New Forest",
"E07000195" => "Newcastle-under-Lyme", "E07000175" => "Newark and Sherwood",
"E09000025" => "Newham", "E08000021" => "Newcastle upon Tyne",
"E07000043" => "North Devon", "E07000195" => "Newcastle-under-Lyme",
"E07000038" => "North East Derbyshire", "E09000025" => "Newham",
"E06000012" => "North East Lincolnshire", "E07000043" => "North Devon",
"E07000099" => "North Hertfordshire", "E07000038" => "North East Derbyshire",
"E07000139" => "North Kesteven", "E06000012" => "North East Lincolnshire",
"E06000013" => "North Lincolnshire", "E07000099" => "North Hertfordshire",
"E07000147" => "North Norfolk", "E07000139" => "North Kesteven",
"E06000024" => "North Somerset", "E06000013" => "North Lincolnshire",
"E08000022" => "North Tyneside", "E07000147" => "North Norfolk",
"E07000218" => "North Warwickshire", "E06000024" => "North Somerset",
"E07000134" => "North West Leicestershire", "E08000022" => "North Tyneside",
"E07000154" => "Northampton", "E07000218" => "North Warwickshire",
"E06000057" => "Northumberland", "E07000134" => "North West Leicestershire",
"E07000148" => "Norwich", "E07000154" => "Northampton",
"E06000018" => "Nottingham", "E06000057" => "Northumberland",
"E07000219" => "Nuneaton and Bedworth", "E07000148" => "Norwich",
"E07000135" => "Oadby and Wigston", "E06000018" => "Nottingham",
"E08000004" => "Oldham", "E07000219" => "Nuneaton and Bedworth",
"E07000178" => "Oxford", "E07000135" => "Oadby and Wigston",
"E07000122" => "Pendle", "E08000004" => "Oldham",
"E06000031" => "Peterborough", "E07000178" => "Oxford",
"E06000026" => "Plymouth", "E07000122" => "Pendle",
"E06000044" => "Portsmouth", "E06000031" => "Peterborough",
"E07000123" => "Preston", "E06000026" => "Plymouth",
"E06000038" => "Reading", "E06000044" => "Portsmouth",
"E09000026" => "Redbridge", "E07000123" => "Preston",
"E06000003" => "Redcar and Cleveland", "E06000038" => "Reading",
"E07000236" => "Redditch", "E09000026" => "Redbridge",
"E07000211" => "Reigate and Banstead", "E06000003" => "Redcar and Cleveland",
"E07000124" => "Ribble Valley", "E07000236" => "Redditch",
"E09000027" => "Richmond upon Thames", "E07000211" => "Reigate and Banstead",
"E07000166" => "Richmondshire", "E07000124" => "Ribble Valley",
"E08000005" => "Rochdale", "E09000027" => "Richmond upon Thames",
"E07000075" => "Rochford", "E07000166" => ("Richmondshire" if form.start_date.year < 2023),
"E07000125" => "Rossendale", "E08000005" => "Rochdale",
"E07000064" => "Rother", "E07000075" => "Rochford",
"E08000018" => "Rotherham", "E07000125" => "Rossendale",
"E07000220" => "Rugby", "E07000064" => "Rother",
"E07000212" => "Runnymede", "E08000018" => "Rotherham",
"E07000176" => "Rushcliffe", "E07000220" => "Rugby",
"E07000092" => "Rushmoor", "E07000212" => "Runnymede",
"E06000017" => "Rutland", "E07000176" => "Rushcliffe",
"E07000167" => "Ryedale", "E07000092" => "Rushmoor",
"E08000006" => "Salford", "E06000017" => "Rutland",
"E08000028" => "Sandwell", "E07000167" => ("Ryedale" if form.start_date.year < 2023),
"E07000168" => "Scarborough", "E08000006" => "Salford",
"E07000188" => "Sedgemoor", "E08000028" => "Sandwell",
"E08000014" => "Sefton", "E07000168" => ("Scarborough" if form.start_date.year < 2023),
"E07000169" => "Selby", "E07000188" => ("Sedgemoor" if form.start_date.year < 2023),
"E07000111" => "Sevenoaks", "E08000014" => "Sefton",
"E08000019" => "Sheffield", "E07000169" => ("Selby" if form.start_date.year < 2023),
"E06000051" => "Shropshire", "E07000111" => "Sevenoaks",
"E06000039" => "Slough", "E08000019" => "Sheffield",
"E08000029" => "Solihull", "E06000051" => "Shropshire",
"E07000246" => "Somerset West and Taunton", "E06000039" => "Slough",
"E07000012" => "South Cambridgeshire", "E08000029" => "Solihull",
"E07000039" => "South Derbyshire", "E06000066" => ("Somerset" if form.start_date.year >= 2023),
"E06000025" => "South Gloucestershire", "E07000246" => ("Somerset West and Taunton" if form.start_date.year < 2023),
"E07000044" => "South Hams", "E07000012" => "South Cambridgeshire",
"E07000140" => "South Holland", "E07000039" => "South Derbyshire",
"E07000141" => "South Kesteven", "E06000025" => "South Gloucestershire",
"E07000031" => "South Lakeland", "E07000044" => "South Hams",
"E07000149" => "South Norfolk", "E07000140" => "South Holland",
"E07000155" => "South Northamptonshire", "E07000141" => "South Kesteven",
"E07000179" => "South Oxfordshire", "E07000031" => ("South Lakeland" if form.start_date.year < 2023),
"E07000126" => "South Ribble", "E07000149" => "South Norfolk",
"E07000189" => "South Somerset", "E07000155" => "South Northamptonshire",
"E07000196" => "South Staffordshire", "E07000179" => "South Oxfordshire",
"E08000023" => "South Tyneside", "E07000126" => "South Ribble",
"E06000045" => "Southampton", "E07000189" => ("South Somerset" if form.start_date.year < 2023),
"E06000033" => "Southend-on-Sea", "E07000196" => "South Staffordshire",
"E09000028" => "Southwark", "E08000023" => "South Tyneside",
"E07000213" => "Spelthorne", "E06000045" => "Southampton",
"E07000240" => "St Albans", "E06000033" => "Southend-on-Sea",
"E08000013" => "St. Helens", "E09000028" => "Southwark",
"E07000197" => "Stafford", "E07000213" => "Spelthorne",
"E07000198" => "Staffordshire Moorlands", "E07000240" => "St Albans",
"E07000243" => "Stevenage", "E08000013" => "St. Helens",
"E08000007" => "Stockport", "E07000197" => "Stafford",
"E06000004" => "Stockton-on-Tees", "E07000198" => "Staffordshire Moorlands",
"E06000021" => "Stoke-on-Trent", "E07000243" => "Stevenage",
"E07000221" => "Stratford-on-Avon", "E08000007" => "Stockport",
"E07000082" => "Stroud", "E06000004" => "Stockton-on-Tees",
"E08000024" => "Sunderland", "E06000021" => "Stoke-on-Trent",
"E07000214" => "Surrey Heath", "E07000221" => "Stratford-on-Avon",
"E09000029" => "Sutton", "E07000082" => "Stroud",
"E07000113" => "Swale", "E08000024" => "Sunderland",
"E06000030" => "Swindon", "E07000214" => "Surrey Heath",
"E08000008" => "Tameside", "E09000029" => "Sutton",
"E07000199" => "Tamworth", "E07000113" => "Swale",
"E07000215" => "Tandridge", "E06000030" => "Swindon",
"E07000045" => "Teignbridge", "E08000008" => "Tameside",
"E06000020" => "Telford and Wrekin", "E07000199" => "Tamworth",
"E07000076" => "Tendring", "E07000215" => "Tandridge",
"E07000093" => "Test Valley", "E07000045" => "Teignbridge",
"E07000083" => "Tewkesbury", "E06000020" => "Telford and Wrekin",
"E07000114" => "Thanet", "E07000076" => "Tendring",
"E07000102" => "Three Rivers", "E07000093" => "Test Valley",
"E06000034" => "Thurrock", "E07000083" => "Tewkesbury",
"E07000115" => "Tonbridge and Malling", "E07000114" => "Thanet",
"E06000027" => "Torbay", "E07000102" => "Three Rivers",
"E07000046" => "Torridge", "E06000034" => "Thurrock",
"E09000030" => "Tower Hamlets", "E07000115" => "Tonbridge and Malling",
"E08000009" => "Trafford", "E06000027" => "Torbay",
"E07000116" => "Tunbridge Wells", "E07000046" => "Torridge",
"E07000077" => "Uttlesford", "E09000030" => "Tower Hamlets",
"E07000180" => "Vale of White Horse", "E08000009" => "Trafford",
"E08000036" => "Wakefield", "E07000116" => "Tunbridge Wells",
"E08000030" => "Walsall", "E07000077" => "Uttlesford",
"E09000031" => "Waltham Forest", "E07000180" => "Vale of White Horse",
"E09000032" => "Wandsworth", "E08000036" => "Wakefield",
"E06000007" => "Warrington", "E08000030" => "Walsall",
"E07000222" => "Warwick", "E09000031" => "Waltham Forest",
"E07000103" => "Watford", "E09000032" => "Wandsworth",
"E07000216" => "Waverley", "E06000007" => "Warrington",
"E07000065" => "Wealden", "E07000222" => "Warwick",
"E07000156" => "Wellingborough", "E07000103" => "Watford",
"E07000241" => "Welwyn Hatfield", "E07000216" => "Waverley",
"E06000037" => "West Berkshire", "E07000065" => "Wealden",
"E07000047" => "West Devon", "E07000156" => "Wellingborough",
"E07000127" => "West Lancashire", "E07000241" => "Welwyn Hatfield",
"E07000142" => "West Lindsey", "E06000037" => "West Berkshire",
"E07000181" => "West Oxfordshire", "E07000047" => "West Devon",
"E07000245" => "West Suffolk", "E07000127" => "West Lancashire",
"E09000033" => "Westminster", "E07000142" => "West Lindsey",
"E08000010" => "Wigan", "E07000181" => "West Oxfordshire",
"E06000054" => "Wiltshire", "E07000245" => "West Suffolk",
"E07000094" => "Winchester", "E09000033" => "Westminster",
"E06000040" => "Windsor and Maidenhead", "E06000064" => ("Westmorland and Furness" if form.start_date.year >= 2023),
"E08000015" => "Wirral", "E08000010" => "Wigan",
"E07000217" => "Woking", "E06000054" => "Wiltshire",
"E06000041" => "Wokingham", "E07000094" => "Winchester",
"E08000031" => "Wolverhampton", "E06000040" => "Windsor and Maidenhead",
"E07000237" => "Worcester", "E08000015" => "Wirral",
"E07000229" => "Worthing", "E07000217" => "Woking",
"E07000238" => "Wychavon", "E06000041" => "Wokingham",
"E07000128" => "Wyre", "E08000031" => "Wolverhampton",
"E07000239" => "Wyre Forest", "E07000237" => "Worcester",
"E06000014" => "York", "E07000229" => "Worthing",
}.freeze "E07000238" => "Wychavon",
"E07000128" => "Wyre",
"E07000239" => "Wyre Forest",
"E06000014" => "York",
"E06000065" => ("North Yorkshire" if form.start_date.year >= 2023),
}.compact
end
end end

3
spec/models/form/sales/pages/last_accommodation_la_spec.rb

@ -5,7 +5,8 @@ RSpec.describe Form::Sales::Pages::LastAccommodationLa, type: :model do
let(:page_id) { nil } let(:page_id) { nil }
let(:page_definition) { nil } let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection) } let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date:)) }
let(:start_date) { Time.utc(2022, 4, 1) }
it "has correct subsection" do it "has correct subsection" do
expect(page.subsection).to eq(subsection) expect(page.subsection).to eq(subsection)

3
spec/models/form/sales/pages/property_local_authority_spec.rb

@ -5,7 +5,8 @@ RSpec.describe Form::Sales::Pages::PropertyLocalAuthority, type: :model do
let(:page_id) { nil } let(:page_id) { nil }
let(:page_definition) { nil } let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection) } let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date:)) }
let(:start_date) { Time.utc(2022, 4, 1) }
it "has correct subsection" do it "has correct subsection" do
expect(page.subsection).to eq(subsection) expect(page.subsection).to eq(subsection)

1162
spec/models/form/sales/questions/prevloc_spec.rb

File diff suppressed because it is too large Load Diff

961
spec/models/form/sales/questions/property_local_authority_spec.rb

@ -5,7 +5,9 @@ RSpec.describe Form::Sales::Questions::PropertyLocalAuthority, type: :model do
let(:question_id) { nil } let(:question_id) { nil }
let(:question_definition) { nil } let(:question_definition) { nil }
let(:page) { instance_double(Form::Page) } let(:subsection) { instance_double(Form::Subsection, form: instance_double(Form, start_date:)) }
let(:page) { instance_double(Form::Page, subsection:) }
let(:start_date) { Time.utc(2022, 4, 1) }
it "has correct page" do it "has correct page" do
expect(question.page).to eq(page) expect(question.page).to eq(page)
@ -31,325 +33,642 @@ RSpec.describe Form::Sales::Questions::PropertyLocalAuthority, type: :model do
expect(question.derived?).to be false expect(question.derived?).to be false
end end
it "has the correct answer_options" do context "with 2022/23 form" do
expect(question.answer_options).to eq({ let(:start_date) { Time.utc(2022, 4, 1) }
"" => "Select an option",
"E06000001" => "Hartlepool", it "has the correct answer_options" do
"E06000002" => "Middlesbrough", expect(question.answer_options).to eq({
"E06000003" => "Redcar and Cleveland", "" => "Select an option",
"E06000004" => "Stockton-on-Tees", "E06000001" => "Hartlepool",
"E06000005" => "Darlington", "E06000002" => "Middlesbrough",
"E06000006" => "Halton", "E06000003" => "Redcar and Cleveland",
"E06000007" => "Warrington", "E06000004" => "Stockton-on-Tees",
"E06000008" => "Blackburn with Darwen", "E06000005" => "Darlington",
"E06000009" => "Blackpool", "E06000006" => "Halton",
"E06000010" => "Kingston upon Hull, City of", "E06000007" => "Warrington",
"E06000011" => "East Riding of Yorkshire", "E06000008" => "Blackburn with Darwen",
"E06000012" => "North East Lincolnshire", "E06000009" => "Blackpool",
"E06000013" => "North Lincolnshire", "E06000010" => "Kingston upon Hull, City of",
"E06000014" => "York", "E06000011" => "East Riding of Yorkshire",
"E06000015" => "Derby", "E06000012" => "North East Lincolnshire",
"E06000016" => "Leicester", "E06000013" => "North Lincolnshire",
"E06000017" => "Rutland", "E06000014" => "York",
"E06000018" => "Nottingham", "E06000015" => "Derby",
"E06000019" => "Herefordshire, County of", "E06000016" => "Leicester",
"E06000020" => "Telford and Wrekin", "E06000017" => "Rutland",
"E06000021" => "Stoke-on-Trent", "E06000018" => "Nottingham",
"E06000022" => "Bath and North East Somerset", "E06000019" => "Herefordshire, County of",
"E06000023" => "Bristol, City of", "E06000020" => "Telford and Wrekin",
"E06000024" => "North Somerset", "E06000021" => "Stoke-on-Trent",
"E06000025" => "South Gloucestershire", "E06000022" => "Bath and North East Somerset",
"E06000026" => "Plymouth", "E06000023" => "Bristol, City of",
"E06000027" => "Torbay", "E06000024" => "North Somerset",
"E06000030" => "Swindon", "E06000025" => "South Gloucestershire",
"E06000031" => "Peterborough", "E06000026" => "Plymouth",
"E06000032" => "Luton", "E06000027" => "Torbay",
"E06000033" => "Southend-on-Sea", "E06000030" => "Swindon",
"E06000034" => "Thurrock", "E06000031" => "Peterborough",
"E06000035" => "Medway", "E06000032" => "Luton",
"E06000036" => "Bracknell Forest", "E06000033" => "Southend-on-Sea",
"E06000037" => "West Berkshire", "E06000034" => "Thurrock",
"E06000038" => "Reading", "E06000035" => "Medway",
"E06000039" => "Slough", "E06000036" => "Bracknell Forest",
"E06000040" => "Windsor and Maidenhead", "E06000037" => "West Berkshire",
"E06000041" => "Wokingham", "E06000038" => "Reading",
"E06000042" => "Milton Keynes", "E06000039" => "Slough",
"E06000043" => "Brighton and Hove", "E06000040" => "Windsor and Maidenhead",
"E06000044" => "Portsmouth", "E06000041" => "Wokingham",
"E06000045" => "Southampton", "E06000042" => "Milton Keynes",
"E06000046" => "Isle of Wight", "E06000043" => "Brighton and Hove",
"E06000047" => "County Durham", "E06000044" => "Portsmouth",
"E06000049" => "Cheshire East", "E06000045" => "Southampton",
"E06000050" => "Cheshire West and Chester", "E06000046" => "Isle of Wight",
"E06000051" => "Shropshire", "E06000047" => "County Durham",
"E06000052" => "Cornwall", "E06000049" => "Cheshire East",
"E06000053" => "Isles of Scilly", "E06000050" => "Cheshire West and Chester",
"E06000054" => "Wiltshire", "E06000051" => "Shropshire",
"E06000055" => "Bedford", "E06000052" => "Cornwall",
"E06000056" => "Central Bedfordshire", "E06000053" => "Isles of Scilly",
"E06000057" => "Northumberland", "E06000054" => "Wiltshire",
"E06000058" => "Bournemouth, Christchurch and Poole", "E06000055" => "Bedford",
"E06000059" => "Dorset", "E06000056" => "Central Bedfordshire",
"E06000060" => "Buckinghamshire", "E06000057" => "Northumberland",
"E07000008" => "Cambridge", "E06000058" => "Bournemouth, Christchurch and Poole",
"E07000009" => "East Cambridgeshire", "E06000059" => "Dorset",
"E07000010" => "Fenland", "E06000060" => "Buckinghamshire",
"E07000011" => "Huntingdonshire", "E07000008" => "Cambridge",
"E07000012" => "South Cambridgeshire", "E07000009" => "East Cambridgeshire",
"E07000026" => "Allerdale", "E07000010" => "Fenland",
"E07000027" => "Barrow-in-Furness", "E07000011" => "Huntingdonshire",
"E07000028" => "Carlisle", "E07000012" => "South Cambridgeshire",
"E07000029" => "Copeland", "E07000026" => "Allerdale",
"E07000030" => "Eden", "E07000027" => "Barrow-in-Furness",
"E07000031" => "South Lakeland", "E07000028" => "Carlisle",
"E07000032" => "Amber Valley", "E07000029" => "Copeland",
"E07000033" => "Bolsover", "E07000030" => "Eden",
"E07000034" => "Chesterfield", "E07000031" => "South Lakeland",
"E07000035" => "Derbyshire Dales", "E07000032" => "Amber Valley",
"E07000036" => "Erewash", "E07000033" => "Bolsover",
"E07000037" => "High Peak", "E07000034" => "Chesterfield",
"E07000038" => "North East Derbyshire", "E07000035" => "Derbyshire Dales",
"E07000039" => "South Derbyshire", "E07000036" => "Erewash",
"E07000040" => "East Devon", "E07000037" => "High Peak",
"E07000041" => "Exeter", "E07000038" => "North East Derbyshire",
"E07000042" => "Mid Devon", "E07000039" => "South Derbyshire",
"E07000043" => "North Devon", "E07000040" => "East Devon",
"E07000044" => "South Hams", "E07000041" => "Exeter",
"E07000045" => "Teignbridge", "E07000042" => "Mid Devon",
"E07000046" => "Torridge", "E07000043" => "North Devon",
"E07000047" => "West Devon", "E07000044" => "South Hams",
"E07000061" => "Eastbourne", "E07000045" => "Teignbridge",
"E07000062" => "Hastings", "E07000046" => "Torridge",
"E07000063" => "Lewes", "E07000047" => "West Devon",
"E07000064" => "Rother", "E07000061" => "Eastbourne",
"E07000065" => "Wealden", "E07000062" => "Hastings",
"E07000066" => "Basildon", "E07000063" => "Lewes",
"E07000067" => "Braintree", "E07000064" => "Rother",
"E07000068" => "Brentwood", "E07000065" => "Wealden",
"E07000069" => "Castle Point", "E07000066" => "Basildon",
"E07000070" => "Chelmsford", "E07000067" => "Braintree",
"E07000071" => "Colchester", "E07000068" => "Brentwood",
"E07000072" => "Epping Forest", "E07000069" => "Castle Point",
"E07000073" => "Harlow", "E07000070" => "Chelmsford",
"E07000074" => "Maldon", "E07000071" => "Colchester",
"E07000075" => "Rochford", "E07000072" => "Epping Forest",
"E07000076" => "Tendring", "E07000073" => "Harlow",
"E07000077" => "Uttlesford", "E07000074" => "Maldon",
"E07000078" => "Cheltenham", "E07000075" => "Rochford",
"E07000079" => "Cotswold", "E07000076" => "Tendring",
"E07000080" => "Forest of Dean", "E07000077" => "Uttlesford",
"E07000081" => "Gloucester", "E07000078" => "Cheltenham",
"E07000082" => "Stroud", "E07000079" => "Cotswold",
"E07000083" => "Tewkesbury", "E07000080" => "Forest of Dean",
"E07000084" => "Basingstoke and Deane", "E07000081" => "Gloucester",
"E07000085" => "East Hampshire", "E07000082" => "Stroud",
"E07000086" => "Eastleigh", "E07000083" => "Tewkesbury",
"E07000087" => "Fareham", "E07000084" => "Basingstoke and Deane",
"E07000088" => "Gosport", "E07000085" => "East Hampshire",
"E07000089" => "Hart", "E07000086" => "Eastleigh",
"E07000090" => "Havant", "E07000087" => "Fareham",
"E07000091" => "New Forest", "E07000088" => "Gosport",
"E07000092" => "Rushmoor", "E07000089" => "Hart",
"E07000093" => "Test Valley", "E07000090" => "Havant",
"E07000094" => "Winchester", "E07000091" => "New Forest",
"E07000095" => "Broxbourne", "E07000092" => "Rushmoor",
"E07000096" => "Dacorum", "E07000093" => "Test Valley",
"E07000098" => "Hertsmere", "E07000094" => "Winchester",
"E07000099" => "North Hertfordshire", "E07000095" => "Broxbourne",
"E07000102" => "Three Rivers", "E07000096" => "Dacorum",
"E07000103" => "Watford", "E07000098" => "Hertsmere",
"E07000105" => "Ashford", "E07000099" => "North Hertfordshire",
"E07000106" => "Canterbury", "E07000102" => "Three Rivers",
"E07000107" => "Dartford", "E07000103" => "Watford",
"E07000108" => "Dover", "E07000105" => "Ashford",
"E07000109" => "Gravesham", "E07000106" => "Canterbury",
"E07000110" => "Maidstone", "E07000107" => "Dartford",
"E07000111" => "Sevenoaks", "E07000108" => "Dover",
"E07000112" => "Folkestone and Hythe", "E07000109" => "Gravesham",
"E07000113" => "Swale", "E07000110" => "Maidstone",
"E07000114" => "Thanet", "E07000111" => "Sevenoaks",
"E07000115" => "Tonbridge and Malling", "E07000112" => "Folkestone and Hythe",
"E07000116" => "Tunbridge Wells", "E07000113" => "Swale",
"E07000117" => "Burnley", "E07000114" => "Thanet",
"E07000118" => "Chorley", "E07000115" => "Tonbridge and Malling",
"E07000119" => "Fylde", "E07000116" => "Tunbridge Wells",
"E07000120" => "Hyndburn", "E07000117" => "Burnley",
"E07000121" => "Lancaster", "E07000118" => "Chorley",
"E07000122" => "Pendle", "E07000119" => "Fylde",
"E07000123" => "Preston", "E07000120" => "Hyndburn",
"E07000124" => "Ribble Valley", "E07000121" => "Lancaster",
"E07000125" => "Rossendale", "E07000122" => "Pendle",
"E07000126" => "South Ribble", "E07000123" => "Preston",
"E07000127" => "West Lancashire", "E07000124" => "Ribble Valley",
"E07000128" => "Wyre", "E07000125" => "Rossendale",
"E07000129" => "Blaby", "E07000126" => "South Ribble",
"E07000130" => "Charnwood", "E07000127" => "West Lancashire",
"E07000131" => "Harborough", "E07000128" => "Wyre",
"E07000132" => "Hinckley and Bosworth", "E07000129" => "Blaby",
"E07000133" => "Melton", "E07000130" => "Charnwood",
"E07000134" => "North West Leicestershire", "E07000131" => "Harborough",
"E07000135" => "Oadby and Wigston", "E07000132" => "Hinckley and Bosworth",
"E07000136" => "Boston", "E07000133" => "Melton",
"E07000137" => "East Lindsey", "E07000134" => "North West Leicestershire",
"E07000138" => "Lincoln", "E07000135" => "Oadby and Wigston",
"E07000139" => "North Kesteven", "E07000136" => "Boston",
"E07000140" => "South Holland", "E07000137" => "East Lindsey",
"E07000141" => "South Kesteven", "E07000138" => "Lincoln",
"E07000142" => "West Lindsey", "E07000139" => "North Kesteven",
"E07000143" => "Breckland", "E07000140" => "South Holland",
"E07000144" => "Broadland", "E07000141" => "South Kesteven",
"E07000145" => "Great Yarmouth", "E07000142" => "West Lindsey",
"E07000146" => "King’s Lynn and West Norfolk", "E07000143" => "Breckland",
"E07000147" => "North Norfolk", "E07000144" => "Broadland",
"E07000148" => "Norwich", "E07000145" => "Great Yarmouth",
"E07000149" => "South Norfolk", "E07000146" => "King’s Lynn and West Norfolk",
"E07000150" => "Corby", "E07000147" => "North Norfolk",
"E07000151" => "Daventry", "E07000148" => "Norwich",
"E07000152" => "East Northamptonshire", "E07000149" => "South Norfolk",
"E07000153" => "Kettering", "E07000150" => "Corby",
"E07000154" => "Northampton", "E07000151" => "Daventry",
"E07000155" => "South Northamptonshire", "E07000152" => "East Northamptonshire",
"E07000156" => "Wellingborough", "E07000153" => "Kettering",
"E07000163" => "Craven", "E07000154" => "Northampton",
"E07000164" => "Hambleton", "E07000155" => "South Northamptonshire",
"E07000165" => "Harrogate", "E07000156" => "Wellingborough",
"E07000166" => "Richmondshire", "E07000163" => "Craven",
"E07000167" => "Ryedale", "E07000164" => "Hambleton",
"E07000168" => "Scarborough", "E07000165" => "Harrogate",
"E07000169" => "Selby", "E07000166" => "Richmondshire",
"E07000170" => "Ashfield", "E07000167" => "Ryedale",
"E07000171" => "Bassetlaw", "E07000168" => "Scarborough",
"E07000172" => "Broxtowe", "E07000169" => "Selby",
"E07000173" => "Gedling", "E07000170" => "Ashfield",
"E07000174" => "Mansfield", "E07000171" => "Bassetlaw",
"E07000175" => "Newark and Sherwood", "E07000172" => "Broxtowe",
"E07000176" => "Rushcliffe", "E07000173" => "Gedling",
"E07000177" => "Cherwell", "E07000174" => "Mansfield",
"E07000178" => "Oxford", "E07000175" => "Newark and Sherwood",
"E07000179" => "South Oxfordshire", "E07000176" => "Rushcliffe",
"E07000180" => "Vale of White Horse", "E07000177" => "Cherwell",
"E07000181" => "West Oxfordshire", "E07000178" => "Oxford",
"E07000187" => "Mendip", "E07000179" => "South Oxfordshire",
"E07000188" => "Sedgemoor", "E07000180" => "Vale of White Horse",
"E07000189" => "South Somerset", "E07000181" => "West Oxfordshire",
"E07000192" => "Cannock Chase", "E07000187" => "Mendip",
"E07000193" => "East Staffordshire", "E07000188" => "Sedgemoor",
"E07000194" => "Lichfield", "E07000189" => "South Somerset",
"E07000195" => "Newcastle-under-Lyme", "E07000192" => "Cannock Chase",
"E07000196" => "South Staffordshire", "E07000193" => "East Staffordshire",
"E07000197" => "Stafford", "E07000194" => "Lichfield",
"E07000198" => "Staffordshire Moorlands", "E07000195" => "Newcastle-under-Lyme",
"E07000199" => "Tamworth", "E07000196" => "South Staffordshire",
"E07000200" => "Babergh", "E07000197" => "Stafford",
"E07000202" => "Ipswich", "E07000198" => "Staffordshire Moorlands",
"E07000203" => "Mid Suffolk", "E07000199" => "Tamworth",
"E07000207" => "Elmbridge", "E07000200" => "Babergh",
"E07000208" => "Epsom and Ewell", "E07000202" => "Ipswich",
"E07000209" => "Guildford", "E07000203" => "Mid Suffolk",
"E07000210" => "Mole Valley", "E07000207" => "Elmbridge",
"E07000211" => "Reigate and Banstead", "E07000208" => "Epsom and Ewell",
"E07000212" => "Runnymede", "E07000209" => "Guildford",
"E07000213" => "Spelthorne", "E07000210" => "Mole Valley",
"E07000214" => "Surrey Heath", "E07000211" => "Reigate and Banstead",
"E07000215" => "Tandridge", "E07000212" => "Runnymede",
"E07000216" => "Waverley", "E07000213" => "Spelthorne",
"E07000217" => "Woking", "E07000214" => "Surrey Heath",
"E07000218" => "North Warwickshire", "E07000215" => "Tandridge",
"E07000219" => "Nuneaton and Bedworth", "E07000216" => "Waverley",
"E07000220" => "Rugby", "E07000217" => "Woking",
"E07000221" => "Stratford-on-Avon", "E07000218" => "North Warwickshire",
"E07000222" => "Warwick", "E07000219" => "Nuneaton and Bedworth",
"E07000223" => "Adur", "E07000220" => "Rugby",
"E07000224" => "Arun", "E07000221" => "Stratford-on-Avon",
"E07000225" => "Chichester", "E07000222" => "Warwick",
"E07000226" => "Crawley", "E07000223" => "Adur",
"E07000227" => "Horsham", "E07000224" => "Arun",
"E07000228" => "Mid Sussex", "E07000225" => "Chichester",
"E07000229" => "Worthing", "E07000226" => "Crawley",
"E07000234" => "Bromsgrove", "E07000227" => "Horsham",
"E07000235" => "Malvern Hills", "E07000228" => "Mid Sussex",
"E07000236" => "Redditch", "E07000229" => "Worthing",
"E07000237" => "Worcester", "E07000234" => "Bromsgrove",
"E07000238" => "Wychavon", "E07000235" => "Malvern Hills",
"E07000239" => "Wyre Forest", "E07000236" => "Redditch",
"E07000240" => "St Albans", "E07000237" => "Worcester",
"E07000241" => "Welwyn Hatfield", "E07000238" => "Wychavon",
"E07000242" => "East Hertfordshire", "E07000239" => "Wyre Forest",
"E07000243" => "Stevenage", "E07000240" => "St Albans",
"E07000244" => "East Suffolk", "E07000241" => "Welwyn Hatfield",
"E07000245" => "West Suffolk", "E07000242" => "East Hertfordshire",
"E07000246" => "Somerset West and Taunton", "E07000243" => "Stevenage",
"E08000001" => "Bolton", "E07000244" => "East Suffolk",
"E08000002" => "Bury", "E07000245" => "West Suffolk",
"E08000003" => "Manchester", "E07000246" => "Somerset West and Taunton",
"E08000004" => "Oldham", "E08000001" => "Bolton",
"E08000005" => "Rochdale", "E08000002" => "Bury",
"E08000006" => "Salford", "E08000003" => "Manchester",
"E08000007" => "Stockport", "E08000004" => "Oldham",
"E08000008" => "Tameside", "E08000005" => "Rochdale",
"E08000009" => "Trafford", "E08000006" => "Salford",
"E08000010" => "Wigan", "E08000007" => "Stockport",
"E08000011" => "Knowsley", "E08000008" => "Tameside",
"E08000012" => "Liverpool", "E08000009" => "Trafford",
"E08000013" => "St. Helens", "E08000010" => "Wigan",
"E08000014" => "Sefton", "E08000011" => "Knowsley",
"E08000015" => "Wirral", "E08000012" => "Liverpool",
"E08000016" => "Barnsley", "E08000013" => "St. Helens",
"E08000017" => "Doncaster", "E08000014" => "Sefton",
"E08000018" => "Rotherham", "E08000015" => "Wirral",
"E08000019" => "Sheffield", "E08000016" => "Barnsley",
"E08000021" => "Newcastle upon Tyne", "E08000017" => "Doncaster",
"E08000022" => "North Tyneside", "E08000018" => "Rotherham",
"E08000023" => "South Tyneside", "E08000019" => "Sheffield",
"E08000024" => "Sunderland", "E08000021" => "Newcastle upon Tyne",
"E08000025" => "Birmingham", "E08000022" => "North Tyneside",
"E08000026" => "Coventry", "E08000023" => "South Tyneside",
"E08000027" => "Dudley", "E08000024" => "Sunderland",
"E08000028" => "Sandwell", "E08000025" => "Birmingham",
"E08000029" => "Solihull", "E08000026" => "Coventry",
"E08000030" => "Walsall", "E08000027" => "Dudley",
"E08000031" => "Wolverhampton", "E08000028" => "Sandwell",
"E08000032" => "Bradford", "E08000029" => "Solihull",
"E08000033" => "Calderdale", "E08000030" => "Walsall",
"E08000034" => "Kirklees", "E08000031" => "Wolverhampton",
"E08000035" => "Leeds", "E08000032" => "Bradford",
"E08000036" => "Wakefield", "E08000033" => "Calderdale",
"E08000037" => "Gateshead", "E08000034" => "Kirklees",
"E09000001" => "City of London", "E08000035" => "Leeds",
"E09000002" => "Barking and Dagenham", "E08000036" => "Wakefield",
"E09000003" => "Barnet", "E08000037" => "Gateshead",
"E09000004" => "Bexley", "E09000001" => "City of London",
"E09000005" => "Brent", "E09000002" => "Barking and Dagenham",
"E09000006" => "Bromley", "E09000003" => "Barnet",
"E09000007" => "Camden", "E09000004" => "Bexley",
"E09000008" => "Croydon", "E09000005" => "Brent",
"E09000009" => "Ealing", "E09000006" => "Bromley",
"E09000010" => "Enfield", "E09000007" => "Camden",
"E09000011" => "Greenwich", "E09000008" => "Croydon",
"E09000012" => "Hackney", "E09000009" => "Ealing",
"E09000013" => "Hammersmith and Fulham", "E09000010" => "Enfield",
"E09000014" => "Haringey", "E09000011" => "Greenwich",
"E09000015" => "Harrow", "E09000012" => "Hackney",
"E09000016" => "Havering", "E09000013" => "Hammersmith and Fulham",
"E09000017" => "Hillingdon", "E09000014" => "Haringey",
"E09000018" => "Hounslow", "E09000015" => "Harrow",
"E09000019" => "Islington", "E09000016" => "Havering",
"E09000020" => "Kensington and Chelsea", "E09000017" => "Hillingdon",
"E09000021" => "Kingston upon Thames", "E09000018" => "Hounslow",
"E09000022" => "Lambeth", "E09000019" => "Islington",
"E09000023" => "Lewisham", "E09000020" => "Kensington and Chelsea",
"E09000024" => "Merton", "E09000021" => "Kingston upon Thames",
"E09000025" => "Newham", "E09000022" => "Lambeth",
"E09000026" => "Redbridge", "E09000023" => "Lewisham",
"E09000027" => "Richmond upon Thames", "E09000024" => "Merton",
"E09000028" => "Southwark", "E09000025" => "Newham",
"E09000029" => "Sutton", "E09000026" => "Redbridge",
"E09000030" => "Tower Hamlets", "E09000027" => "Richmond upon Thames",
"E09000031" => "Waltham Forest", "E09000028" => "Southwark",
"E09000032" => "Wandsworth", "E09000029" => "Sutton",
"E09000033" => "Westminster", "E09000030" => "Tower Hamlets",
"S12000017" => "Highland", "E09000031" => "Waltham Forest",
"W06000002" => "Gwynedd", "E09000032" => "Wandsworth",
}) "E09000033" => "Westminster",
"S12000017" => "Highland",
"W06000002" => "Gwynedd",
})
end
end
context "with 2023/24 form" do
let(:start_date) { Time.utc(2023, 4, 1) }
it "has the correct answer_options" do
expect(question.answer_options).to eq({
"" => "Select an option",
"E06000001" => "Hartlepool",
"E06000002" => "Middlesbrough",
"E06000003" => "Redcar and Cleveland",
"E06000004" => "Stockton-on-Tees",
"E06000005" => "Darlington",
"E06000006" => "Halton",
"E06000007" => "Warrington",
"E06000008" => "Blackburn with Darwen",
"E06000009" => "Blackpool",
"E06000010" => "Kingston upon Hull, City of",
"E06000011" => "East Riding of Yorkshire",
"E06000012" => "North East Lincolnshire",
"E06000013" => "North Lincolnshire",
"E06000014" => "York",
"E06000015" => "Derby",
"E06000016" => "Leicester",
"E06000017" => "Rutland",
"E06000018" => "Nottingham",
"E06000019" => "Herefordshire, County of",
"E06000020" => "Telford and Wrekin",
"E06000021" => "Stoke-on-Trent",
"E06000022" => "Bath and North East Somerset",
"E06000023" => "Bristol, City of",
"E06000024" => "North Somerset",
"E06000025" => "South Gloucestershire",
"E06000026" => "Plymouth",
"E06000027" => "Torbay",
"E06000030" => "Swindon",
"E06000031" => "Peterborough",
"E06000032" => "Luton",
"E06000033" => "Southend-on-Sea",
"E06000034" => "Thurrock",
"E06000035" => "Medway",
"E06000036" => "Bracknell Forest",
"E06000037" => "West Berkshire",
"E06000038" => "Reading",
"E06000039" => "Slough",
"E06000040" => "Windsor and Maidenhead",
"E06000041" => "Wokingham",
"E06000042" => "Milton Keynes",
"E06000043" => "Brighton and Hove",
"E06000044" => "Portsmouth",
"E06000045" => "Southampton",
"E06000046" => "Isle of Wight",
"E06000047" => "County Durham",
"E06000049" => "Cheshire East",
"E06000050" => "Cheshire West and Chester",
"E06000051" => "Shropshire",
"E06000052" => "Cornwall",
"E06000053" => "Isles of Scilly",
"E06000054" => "Wiltshire",
"E06000055" => "Bedford",
"E06000056" => "Central Bedfordshire",
"E06000057" => "Northumberland",
"E06000058" => "Bournemouth, Christchurch and Poole",
"E06000059" => "Dorset",
"E06000060" => "Buckinghamshire",
"E07000008" => "Cambridge",
"E07000009" => "East Cambridgeshire",
"E07000010" => "Fenland",
"E07000011" => "Huntingdonshire",
"E07000012" => "South Cambridgeshire",
"E07000032" => "Amber Valley",
"E07000033" => "Bolsover",
"E07000034" => "Chesterfield",
"E07000035" => "Derbyshire Dales",
"E07000036" => "Erewash",
"E07000037" => "High Peak",
"E07000038" => "North East Derbyshire",
"E07000039" => "South Derbyshire",
"E07000040" => "East Devon",
"E07000041" => "Exeter",
"E07000042" => "Mid Devon",
"E07000043" => "North Devon",
"E07000044" => "South Hams",
"E07000045" => "Teignbridge",
"E07000046" => "Torridge",
"E07000047" => "West Devon",
"E07000061" => "Eastbourne",
"E07000062" => "Hastings",
"E07000063" => "Lewes",
"E07000064" => "Rother",
"E07000065" => "Wealden",
"E07000066" => "Basildon",
"E07000067" => "Braintree",
"E07000068" => "Brentwood",
"E07000069" => "Castle Point",
"E07000070" => "Chelmsford",
"E07000071" => "Colchester",
"E07000072" => "Epping Forest",
"E07000073" => "Harlow",
"E07000074" => "Maldon",
"E07000075" => "Rochford",
"E07000076" => "Tendring",
"E07000077" => "Uttlesford",
"E07000078" => "Cheltenham",
"E07000079" => "Cotswold",
"E07000080" => "Forest of Dean",
"E07000081" => "Gloucester",
"E07000082" => "Stroud",
"E07000083" => "Tewkesbury",
"E07000084" => "Basingstoke and Deane",
"E07000085" => "East Hampshire",
"E07000086" => "Eastleigh",
"E07000087" => "Fareham",
"E07000088" => "Gosport",
"E07000089" => "Hart",
"E07000090" => "Havant",
"E07000091" => "New Forest",
"E07000092" => "Rushmoor",
"E07000093" => "Test Valley",
"E07000094" => "Winchester",
"E07000095" => "Broxbourne",
"E07000096" => "Dacorum",
"E07000098" => "Hertsmere",
"E07000099" => "North Hertfordshire",
"E07000102" => "Three Rivers",
"E07000103" => "Watford",
"E07000105" => "Ashford",
"E07000106" => "Canterbury",
"E07000107" => "Dartford",
"E07000108" => "Dover",
"E07000109" => "Gravesham",
"E07000110" => "Maidstone",
"E07000111" => "Sevenoaks",
"E07000112" => "Folkestone and Hythe",
"E07000113" => "Swale",
"E07000114" => "Thanet",
"E07000115" => "Tonbridge and Malling",
"E07000116" => "Tunbridge Wells",
"E07000117" => "Burnley",
"E07000118" => "Chorley",
"E07000119" => "Fylde",
"E07000120" => "Hyndburn",
"E07000121" => "Lancaster",
"E07000122" => "Pendle",
"E07000123" => "Preston",
"E07000124" => "Ribble Valley",
"E07000125" => "Rossendale",
"E07000126" => "South Ribble",
"E07000127" => "West Lancashire",
"E07000128" => "Wyre",
"E07000129" => "Blaby",
"E07000130" => "Charnwood",
"E07000131" => "Harborough",
"E07000132" => "Hinckley and Bosworth",
"E07000133" => "Melton",
"E07000134" => "North West Leicestershire",
"E07000135" => "Oadby and Wigston",
"E07000136" => "Boston",
"E07000137" => "East Lindsey",
"E07000138" => "Lincoln",
"E07000139" => "North Kesteven",
"E07000140" => "South Holland",
"E07000141" => "South Kesteven",
"E07000142" => "West Lindsey",
"E07000143" => "Breckland",
"E07000144" => "Broadland",
"E07000145" => "Great Yarmouth",
"E07000146" => "King’s Lynn and West Norfolk",
"E07000147" => "North Norfolk",
"E07000148" => "Norwich",
"E07000149" => "South Norfolk",
"E07000150" => "Corby",
"E07000151" => "Daventry",
"E07000152" => "East Northamptonshire",
"E07000153" => "Kettering",
"E07000154" => "Northampton",
"E07000155" => "South Northamptonshire",
"E07000156" => "Wellingborough",
"E07000170" => "Ashfield",
"E07000171" => "Bassetlaw",
"E07000172" => "Broxtowe",
"E07000173" => "Gedling",
"E07000174" => "Mansfield",
"E07000175" => "Newark and Sherwood",
"E07000176" => "Rushcliffe",
"E07000177" => "Cherwell",
"E07000178" => "Oxford",
"E07000179" => "South Oxfordshire",
"E07000180" => "Vale of White Horse",
"E07000181" => "West Oxfordshire",
"E07000192" => "Cannock Chase",
"E07000193" => "East Staffordshire",
"E07000194" => "Lichfield",
"E07000195" => "Newcastle-under-Lyme",
"E07000196" => "South Staffordshire",
"E07000197" => "Stafford",
"E07000198" => "Staffordshire Moorlands",
"E07000199" => "Tamworth",
"E07000200" => "Babergh",
"E07000202" => "Ipswich",
"E07000203" => "Mid Suffolk",
"E07000207" => "Elmbridge",
"E07000208" => "Epsom and Ewell",
"E07000209" => "Guildford",
"E07000210" => "Mole Valley",
"E07000211" => "Reigate and Banstead",
"E07000212" => "Runnymede",
"E07000213" => "Spelthorne",
"E07000214" => "Surrey Heath",
"E07000215" => "Tandridge",
"E07000216" => "Waverley",
"E07000217" => "Woking",
"E07000218" => "North Warwickshire",
"E07000219" => "Nuneaton and Bedworth",
"E07000220" => "Rugby",
"E07000221" => "Stratford-on-Avon",
"E07000222" => "Warwick",
"E07000223" => "Adur",
"E07000224" => "Arun",
"E07000225" => "Chichester",
"E07000226" => "Crawley",
"E07000227" => "Horsham",
"E07000228" => "Mid Sussex",
"E07000229" => "Worthing",
"E07000234" => "Bromsgrove",
"E07000235" => "Malvern Hills",
"E07000236" => "Redditch",
"E07000237" => "Worcester",
"E07000238" => "Wychavon",
"E07000239" => "Wyre Forest",
"E07000240" => "St Albans",
"E07000241" => "Welwyn Hatfield",
"E07000242" => "East Hertfordshire",
"E07000243" => "Stevenage",
"E07000244" => "East Suffolk",
"E07000245" => "West Suffolk",
"E08000001" => "Bolton",
"E08000002" => "Bury",
"E08000003" => "Manchester",
"E08000004" => "Oldham",
"E08000005" => "Rochdale",
"E08000006" => "Salford",
"E08000007" => "Stockport",
"E08000008" => "Tameside",
"E08000009" => "Trafford",
"E08000010" => "Wigan",
"E08000011" => "Knowsley",
"E08000012" => "Liverpool",
"E08000013" => "St. Helens",
"E08000014" => "Sefton",
"E08000015" => "Wirral",
"E08000016" => "Barnsley",
"E08000017" => "Doncaster",
"E08000018" => "Rotherham",
"E08000019" => "Sheffield",
"E08000021" => "Newcastle upon Tyne",
"E08000022" => "North Tyneside",
"E08000023" => "South Tyneside",
"E08000024" => "Sunderland",
"E08000025" => "Birmingham",
"E08000026" => "Coventry",
"E08000027" => "Dudley",
"E08000028" => "Sandwell",
"E08000029" => "Solihull",
"E06000066" => "Somerset",
"E08000030" => "Walsall",
"E08000031" => "Wolverhampton",
"E08000032" => "Bradford",
"E08000033" => "Calderdale",
"E08000034" => "Kirklees",
"E08000035" => "Leeds",
"E08000036" => "Wakefield",
"E08000037" => "Gateshead",
"E09000001" => "City of London",
"E09000002" => "Barking and Dagenham",
"E09000003" => "Barnet",
"E09000004" => "Bexley",
"E09000005" => "Brent",
"E09000006" => "Bromley",
"E09000007" => "Camden",
"E09000008" => "Croydon",
"E06000063" => "Cumberland",
"E09000009" => "Ealing",
"E09000010" => "Enfield",
"E09000011" => "Greenwich",
"E09000012" => "Hackney",
"E09000013" => "Hammersmith and Fulham",
"E09000014" => "Haringey",
"E09000015" => "Harrow",
"E09000016" => "Havering",
"E09000017" => "Hillingdon",
"E09000018" => "Hounslow",
"E09000019" => "Islington",
"E09000020" => "Kensington and Chelsea",
"E09000021" => "Kingston upon Thames",
"E09000022" => "Lambeth",
"E09000023" => "Lewisham",
"E09000024" => "Merton",
"E09000025" => "Newham",
"E09000026" => "Redbridge",
"E09000027" => "Richmond upon Thames",
"E09000028" => "Southwark",
"E09000029" => "Sutton",
"E09000030" => "Tower Hamlets",
"E09000031" => "Waltham Forest",
"E09000032" => "Wandsworth",
"E09000033" => "Westminster",
"E06000064" => "Westmorland and Furness",
"S12000017" => "Highland",
"W06000002" => "Gwynedd",
"E06000065" => "North Yorkshire",
})
end
end end
end end

Loading…
Cancel
Save