mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
Switch "areas" field to "areas_2" format
The Admin app is now temporarily using the "areas_2" field while we migrate "areas" to the new format [1]. [1]: https://github.com/alphagov/notifications-admin/pull/4004
This commit is contained in:
@@ -84,10 +84,10 @@ def test_valid_post_cap_xml_broadcast_returns_201(
|
||||
|
||||
assert response_json['approved_at'] is None
|
||||
assert response_json['approved_by_id'] is None
|
||||
# TEMPORARY: while we repurpose "areas"
|
||||
assert response_json['areas'] == [
|
||||
assert response_json['areas']['names'] == [
|
||||
'River Steeping in Wainfleet All Saints'
|
||||
]
|
||||
# TEMPORARY: while we repurpose "areas"
|
||||
assert response_json['areas_2']['names'] == [
|
||||
'River Steeping in Wainfleet All Saints'
|
||||
]
|
||||
@@ -108,11 +108,11 @@ def test_valid_post_cap_xml_broadcast_returns_201(
|
||||
assert response_json['service_id'] == str(sample_broadcast_service.id)
|
||||
|
||||
# TEMPORARY: while we repurpose "areas"
|
||||
assert len(response_json['simple_polygons']) == 1
|
||||
assert len(response_json['simple_polygons'][0]) == 23
|
||||
assert response_json['simple_polygons'][0][0] == [53.10562, 0.244127]
|
||||
assert response_json['simple_polygons'][0][-1] == [53.10562, 0.244127]
|
||||
assert response_json['simple_polygons'][0][-1] == [53.10562, 0.244127]
|
||||
assert len(response_json['areas']['simple_polygons']) == 1
|
||||
assert len(response_json['areas']['simple_polygons'][0]) == 23
|
||||
assert response_json['areas']['simple_polygons'][0][0] == [53.10562, 0.244127]
|
||||
assert response_json['areas']['simple_polygons'][0][-1] == [53.10562, 0.244127]
|
||||
assert response_json['areas']['simple_polygons'][0][-1] == [53.10562, 0.244127]
|
||||
assert len(response_json['areas_2']['simple_polygons']) == 1
|
||||
assert len(response_json['areas_2']['simple_polygons'][0]) == 23
|
||||
assert response_json['areas_2']['simple_polygons'][0][0] == [53.10562, 0.244127]
|
||||
|
||||
Reference in New Issue
Block a user