aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/app/controller/around.t10
-rw-r--r--t/app/controller/report_new.t2
-rw-r--r--t/app/controller/report_new_text.t2
-rw-r--r--t/cobrand/oxfordshire.t8
-rw-r--r--t/map/tilma/original.t6
5 files changed, 14 insertions, 14 deletions
diff --git a/t/app/controller/around.t b/t/app/controller/around.t
index cdaeaf363..8b4fc7825 100644
--- a/t/app/controller/around.t
+++ b/t/app/controller/around.t
@@ -135,7 +135,7 @@ subtest 'check non public reports are not displayed on around page' => sub {
};
-subtest 'check category and status filtering works on /ajax' => sub {
+subtest 'check category and status filtering works on /around?ajax' => sub {
my $categories = [ 'Pothole', 'Vegetation', 'Flytipping' ];
my $params = {
postcode => 'OX1 1ND',
@@ -157,19 +157,19 @@ subtest 'check category and status filtering works on /ajax' => sub {
}
}
- my $json = $mech->get_ok_json( '/ajax?bbox=' . $bbox );
+ my $json = $mech->get_ok_json( '/around?ajax=1&bbox=' . $bbox );
my $pins = $json->{pins};
is scalar @$pins, 6, 'correct number of reports when no filters';
- $json = $mech->get_ok_json( '/ajax?filter_category=Pothole&bbox=' . $bbox );
+ $json = $mech->get_ok_json( '/around?ajax=1&filter_category=Pothole&bbox=' . $bbox );
$pins = $json->{pins};
is scalar @$pins, 2, 'correct number of Pothole reports';
- $json = $mech->get_ok_json( '/ajax?status=open&bbox=' . $bbox );
+ $json = $mech->get_ok_json( '/around?ajax=1&status=open&bbox=' . $bbox );
$pins = $json->{pins};
is scalar @$pins, 3, 'correct number of open reports';
- $json = $mech->get_ok_json( '/ajax?status=fixed&filter_category=Vegetation&bbox=' . $bbox );
+ $json = $mech->get_ok_json( '/around?ajax=1&status=fixed&filter_category=Vegetation&bbox=' . $bbox );
$pins = $json->{pins};
is scalar @$pins, 1, 'correct number of fixed Vegetation reports';
};
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index efe392eab..f741ec796 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -893,7 +893,7 @@ foreach my $test (
# Test that AJAX pages return the right data
$mech->get_ok(
- '/ajax?bbox=' . ($report->longitude - 0.01) . ',' . ($report->latitude - 0.01)
+ '/around?ajax=1&bbox=' . ($report->longitude - 0.01) . ',' . ($report->latitude - 0.01)
. ',' . ($report->longitude + 0.01) . ',' . ($report->latitude + 0.01)
);
$mech->content_contains( "Test Report at caf\xc3\xa9" );
diff --git a/t/app/controller/report_new_text.t b/t/app/controller/report_new_text.t
index 94f350eba..734b9dbb4 100644
--- a/t/app/controller/report_new_text.t
+++ b/t/app/controller/report_new_text.t
@@ -362,7 +362,7 @@ subtest "test report creation for a user who is logged in" => sub {
$mech->logged_in_ok;
$mech->get_ok(
- '/ajax?bbox=' . ($report->longitude - 0.01) . ',' . ($report->latitude - 0.01)
+ '/around?ajax=1&bbox=' . ($report->longitude - 0.01) . ',' . ($report->latitude - 0.01)
. ',' . ($report->longitude + 0.01) . ',' . ($report->latitude + 0.01)
);
$mech->content_contains( "Test Report at caf\xc3\xa9" );
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';
}
diff --git a/t/map/tilma/original.t b/t/map/tilma/original.t
index b29155bee..e89251285 100644
--- a/t/map/tilma/original.t
+++ b/t/map/tilma/original.t
@@ -92,17 +92,17 @@ for my $test (
$report->state($test->{state});
$report->update;
- my ( $on_map_all, $on_map_list, $nearby, $dist ) =
+ my ( $on_map, $nearby, $dist ) =
FixMyStreet::Map::map_features($c, bbox => "0,0,0,0");
- ok $on_map_list;
+ ok $on_map;
ok $nearby;
ok $dist;
my $id = $report->id;
my $colour = $test->{colour};
- my $pin_colour = $c->cobrand->pin_colour($on_map_all->[0], 'around');
+ my $pin_colour = $c->cobrand->pin_colour($on_map->[0], 'around');
is $pin_colour, $colour, 'pin colour';
};
}