aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/open311.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-07-16 13:59:52 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-07-16 13:59:52 +0100
commit56cd029d00d34b69de8b2f2a8cf9f2c82621a79d (patch)
treeaf510f52ab26b59925ae78c87a11819d4f9e9dd0 /t/app/controller/open311.t
parentbe4801c45f919b30bec0adfda6a2a3e8327ec8a3 (diff)
parent771d442520ff98fc19df63eddf9ed0fc0838d92a (diff)
Merge branch 'open311-receive-update'
Diffstat (limited to 't/app/controller/open311.t')
-rw-r--r--t/app/controller/open311.t10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/app/controller/open311.t b/t/app/controller/open311.t
index 79fe159a3..c052605c7 100644
--- a/t/app/controller/open311.t
+++ b/t/app/controller/open311.t
@@ -14,7 +14,7 @@ $mech->content_contains('<status>open</status>');
$mech->get_ok('/open311/v2/requests.json?jurisdiction_id=foo&status=open&agency_responsible=2237');
my $json = decode_json($mech->content);
-my $problems = $json->{requests}[0]{request};
+my $problems = $json->{service_requests};
is @$problems, 2;
like $problems->[0]{description}, qr/Around page Test/;
@@ -25,7 +25,7 @@ subtest "non_public reports aren't available" => sub {
});
$mech->get_ok('/open311/v2/requests.json?jurisdiction_id=foo');
$json = decode_json($mech->content);
- $problems = $json->{requests}[0]{request};
+ $problems = $json->{service_requests};
is @$problems, 1;
like $problems->[0]{description}, qr/Around page Test/;
$mech->content_lacks('This report is now private');
@@ -33,7 +33,7 @@ subtest "non_public reports aren't available" => sub {
my $problem_id = $problem1->id;
$mech->get_ok("/open311/v2/requests/$problem_id.json?jurisdiction_id=foo");
$json = decode_json($mech->content);
- $problems = $json->{requests}[0]{request};
+ $problems = $json->{service_requests};
is @$problems, 0;
};
@@ -45,7 +45,7 @@ subtest "hidden reports aren't available" => sub {
});
$mech->get_ok('/open311/v2/requests.json?jurisdiction_id=foo');
$json = decode_json($mech->content);
- $problems = $json->{requests}[0]{request};
+ $problems = $json->{service_requests};
is @$problems, 1;
like $problems->[0]{description}, qr/Around page Test/;
$mech->content_lacks('This report is now hidden');
@@ -53,7 +53,7 @@ subtest "hidden reports aren't available" => sub {
my $problem_id = $problem1->id;
$mech->get_ok("/open311/v2/requests/$problem_id.json?jurisdiction_id=foo");
$json = decode_json($mech->content);
- $problems = $json->{requests}[0]{request};
+ $problems = $json->{service_requests};
is @$problems, 0;
};