aboutsummaryrefslogtreecommitdiffstats
path: root/t/cobrand
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-08-15 18:25:08 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-11-02 18:06:22 +0000
commit660631a3ff063e6378c9838f40c1d9bfa8dcfd43 (patch)
tree0fc54ec7c71e0923376c1abbfea87756521c8e40 /t/cobrand
parent64a24f1d9bf251cc57d363e7bf57d4218a5e2cb8 (diff)
Have /around ajax use same format as others.
Both /reports and /my work by using the same URL with ajax=1. We should use the same on /around for consistency.
Diffstat (limited to 't/cobrand')
-rw-r--r--t/cobrand/oxfordshire.t8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/cobrand/oxfordshire.t b/t/cobrand/oxfordshire.t
index dcf8b25c9..ee30e7e0b 100644
--- a/t/cobrand/oxfordshire.t
+++ b/t/cobrand/oxfordshire.t
@@ -7,7 +7,7 @@ my $mech = FixMyStreet::TestMech->new;
my $oxon = $mech->create_body_ok(2237, 'Oxfordshire County Council');
-subtest 'check /ajax defaults to open reports only' => sub {
+subtest 'check /around?ajax defaults to open reports only' => sub {
my $categories = [ 'Bridges', 'Fences', 'Manhole' ];
my $params = {
postcode => 'OX28 4DS',
@@ -33,15 +33,15 @@ subtest 'check /ajax defaults to open reports only' => sub {
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ { 'oxfordshire' => '.' } ],
}, sub {
- my $json = $mech->get_ok_json( '/ajax?status=all&bbox=' . $bbox );
+ my $json = $mech->get_ok_json( '/around?ajax=1&status=all&bbox=' . $bbox );
my $pins = $json->{pins};
is scalar @$pins, 6, 'correct number of reports created';
- $json = $mech->get_ok_json( '/ajax?bbox=' . $bbox );
+ $json = $mech->get_ok_json( '/around?ajax=1&bbox=' . $bbox );
$pins = $json->{pins};
is scalar @$pins, 3, 'correct number of reports returned with no filters';
- $json = $mech->get_ok_json( '/ajax?filter_category=Fences&bbox=' . $bbox );
+ $json = $mech->get_ok_json( '/around?ajax=1&filter_category=Fences&bbox=' . $bbox );
$pins = $json->{pins};
is scalar @$pins, 1, 'only one Fences report by default';
}