diff --git a/app/broadcast_areas/repo.py b/app/broadcast_areas/repo.py index 171e544ba..6465e58c1 100644 --- a/app/broadcast_areas/repo.py +++ b/app/broadcast_areas/repo.py @@ -121,7 +121,7 @@ class BroadcastAreasRepository(object): ), area_count AS (SELECT COUNT(*) AS c FROM areas), subset_area_count AS (SELECT c - 4 FROM area_count), - description_area_names AS (SELECT name FROM areas LIMIT 4), + description_area_names AS (SELECT name FROM areas ORDER BY name ASC LIMIT 4), description_areas_joined AS ( SELECT GROUP_CONCAT(name, ", ") FROM description_area_names ) diff --git a/tests/app/broadcast_areas/test_broadcast_area.py b/tests/app/broadcast_areas/test_broadcast_area.py index 66226ea7d..9417442c5 100644 --- a/tests/app/broadcast_areas/test_broadcast_area.py +++ b/tests/app/broadcast_areas/test_broadcast_area.py @@ -51,17 +51,17 @@ def test_examples(): assert countries == 'England, Northern Ireland, Scotland, Wales' regions = broadcast_area_libraries.get('regions-of-england').get_examples() - assert regions == 'North East, North West, Yorkshire and The Humber, East Midlands, and 5 more…' + assert regions == 'East Midlands, East of England, London, North East, and 5 more…' counties = broadcast_area_libraries.get( 'counties-and-unitary-authorities-in-england-and-wales', ).get_examples() - assert counties == 'Hartlepool, Middlesbrough, Redcar and Cleveland, Stockton-on-Tees, and 170 more…' + assert counties == 'Barking and Dagenham, Barnet, Barnsley, Bath and North East Somerset, and 170 more…' wards = broadcast_area_libraries.get( 'electoral-wards-of-the-united-kingdom', ).get_examples() - assert wards == 'Hartlepool, Middlesbrough, Redcar and Cleveland, Stockton-on-Tees, and 375 more…' + assert wards == 'Aberdeen City, Aberdeenshire, Adur, Allerdale, and 375 more…' @pytest.mark.parametrize('id', (