@@ -80,6 +80,46 @@ Feature: Agenda Search - Filter Locations Based on State
80
80
}
81
81
"""
82
82
83
+ And we post json to "/push"
84
+ """
85
+ {
86
+ "guid": "event5", "type": "event", "state": "scheduled", "pubstatus": "usable",
87
+ "slugline": "Empty Name Event",
88
+ "name": "",
89
+ "dates": {
90
+ "start": "2018-05-28T04:00:00+0000",
91
+ "end": "2018-05-28T05:00:00+0000",
92
+ "tz": "Australia/Sydney"
93
+ },
94
+ "calendars": [{"qcode": "cal3", "name": "Calendar3"}],
95
+ "subject": [
96
+ {"code": "d3", "scheme": "sttdepartment", "name": "Dep3"},
97
+ {"code": "s3", "scheme": "sttsubj", "name": "Sub3"},
98
+ {"code": "e3", "scheme": "event_type", "name": "Art"}
99
+ ],
100
+ "place": [
101
+ {"code": "ON", "name": "Ontario"}
102
+ ],
103
+ "anpa_category": [
104
+ {"qcode": "e", "name": "Entertainment"},
105
+ {"qcode": "f", "name": "Finance"}
106
+ ],
107
+ "location": [{
108
+ "name": "",
109
+ "address": {
110
+ "city": "",
111
+ "state": "Ontario",
112
+ "country": "Canada",
113
+ "line": ["Empty Street"],
114
+ "postal_code": "M5V 3L9",
115
+ "type": "museum",
116
+ "title": "Empty Location Name",
117
+ "area": "Downtown Toronto"
118
+ }
119
+ }]
120
+ }
121
+ """
122
+
83
123
@auth @admin
84
124
Scenario : Verify locations are filtered based on event state
85
125
When we get "/agenda/search_locations"
@@ -94,3 +134,24 @@ Feature: Agenda Search - Filter Locations Based on State
94
134
]
95
135
}
96
136
"""
137
+
138
+ @auth @admin
139
+ Scenario : Verify locations with empty names are not included in the response
140
+ When we get "/agenda/search_locations"
141
+ Then we get existing resource
142
+ """
143
+ {
144
+ "regions": [
145
+ {
146
+ "name": "New South Wales",
147
+ "country": "Australia",
148
+ "type": "state"
149
+ },
150
+ {
151
+ "name": "Australia",
152
+ "type": "country"
153
+ }
154
+ ],
155
+ "places": []
156
+ }
157
+ """
0 commit comments