aboutsummaryrefslogtreecommitdiffstats
path: root/t/open311/populate-service-list.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-06-15 12:43:54 +0100
committerMatthew Somerville <matthew@mysociety.org>2016-06-15 13:47:53 +0100
commit8d428f9c8fd9e25821560a20d00d444d9fb67e08 (patch)
tree52b75a1f922b589a151acccc0ee38c2ac9a90f59 /t/open311/populate-service-list.t
parent96c72fa72e547a2ce5b435db3cae8c3c45efafc1 (diff)
Tidy up Open311 XML handling.
Parse the XML in such a way other parts of the code do not have to worry about single-value folding or the like.
Diffstat (limited to 't/open311/populate-service-list.t')
-rw-r--r--t/open311/populate-service-list.t13
1 files changed, 1 insertions, 12 deletions
diff --git a/t/open311/populate-service-list.t b/t/open311/populate-service-list.t
index f001926d2..606bcbc44 100644
--- a/t/open311/populate-service-list.t
+++ b/t/open311/populate-service-list.t
@@ -419,7 +419,6 @@ for my $test (
);
my $service_list = get_xml_simple_object( $services_xml );
- $service_list = { service => [ $service_list->{ service } ] };
$processor->_current_open311( $o );
$processor->_current_body( $body );
@@ -690,17 +689,7 @@ sub get_standard_xml {
sub get_xml_simple_object {
my $xml = shift;
-
- my $simple = XML::Simple->new();
- my $obj;
-
- eval {
- $obj = $simple->XMLin( $xml );
- };
-
- die $@ if $@;
-
- return $obj;
+ return Open311->_get_xml_object($xml);
}
done_testing();