aboutsummaryrefslogtreecommitdiffstats
path: root/t/open311/endpoint/mysociety.t
diff options
context:
space:
mode:
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