aboutsummaryrefslogtreecommitdiffstats
path: root/t/open311/endpoint/mysociety.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-02-09 14:59:18 +0000
committerMatthew Somerville <matthew@mysociety.org>2016-02-09 14:59:18 +0000
commit6c718aa2e1d3fdbf9f94982a3f95ef5b5495e667 (patch)
treedaa95997ff52c3fdf9313c5893fcfaab8cc781d4 /t/open311/endpoint/mysociety.t
parentc7ddf0cfa97601bfb1da63a977bca68ed3da0583 (diff)
parent9a4b74df50886a5eb79ae53434200b14a1d36a19 (diff)
Merge remote-tracking branch 'mysociety/add-osm-link-to-email'
Diffstat (limited to 't/open311/endpoint/mysociety.t')
-rw-r--r--t/open311/endpoint/mysociety.t5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/open311/endpoint/mysociety.t b/t/open311/endpoint/mysociety.t
index c63e03e43..d0ad60602 100644
--- a/t/open311/endpoint/mysociety.t
+++ b/t/open311/endpoint/mysociety.t
@@ -6,12 +6,11 @@ use Test::MockTime ':all';
use Open311::Endpoint;
use Data::Dumper;
-use JSON;
+use JSON::MaybeXS;
use t::open311::endpoint::Endpoint2;
my $endpoint = t::open311::endpoint::Endpoint2->new;
-my $json = JSON->new;
subtest "POST OK" => sub {
diag "Serves as sanity test of subclassing, as well as preparing our data";
@@ -31,7 +30,7 @@ subtest "POST OK" => sub {
ok $res->is_success, 'valid request'
or diag $res->content;
- is_deeply $json->decode($res->content),
+ is_deeply decode_json($res->content),
[ {
"service_notice" => "This is a test service",
"service_request_id" => 0