aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-05-02 14:34:52 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-05-02 14:34:52 +0100
commit0f8281f5fe419c8ccb76a46e38243f6ab94dda7a (patch)
tree8dbef84deefafc286691784cd9ae3647934f8fe2 /t/app/controller
parent9ddb8c6c990f618e3d65bc4a060f92bce43da7e1 (diff)
parenta344b99a0bf37134079afda51c6f963e1163904b (diff)
Merge branch 'collideoscope-anew'
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/around.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/app/controller/around.t b/t/app/controller/around.t
index 618998513..8eaba6450 100644
--- a/t/app/controller/around.t
+++ b/t/app/controller/around.t
@@ -137,7 +137,7 @@ subtest 'check non public reports are not displayed on around page' => sub {
};
-subtest 'check category and status filtering works on /around' => sub {
+subtest 'check category, status and extra filtering works on /around' => sub {
my $body = $mech->create_body_ok(2237, "Oxfordshire");
my $categories = [ 'Pothole', 'Vegetation', 'Flytipping' ];
@@ -157,6 +157,7 @@ subtest 'check category and status filtering works on /around' => sub {
%$params,
category => $category,
state => $state,
+ external_body => "$category-$state",
);
$mech->create_problems_for_body( 1, $body->id, 'Around page', \%report_params );
}
@@ -185,6 +186,13 @@ subtest 'check category and status filtering works on /around' => sub {
$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';
+
+ my $cobrand = Test::MockModule->new('FixMyStreet::Cobrand::Default');
+ $cobrand->mock('display_location_extra_params', sub { { external_body => "Pothole-fixed" } });
+
+ $json = $mech->get_ok_json( '/around?ajax=1&bbox=' . $bbox );
+ $pins = $json->{pins};
+ is scalar @$pins, 1, 'correct number of external_body reports';
};
subtest 'check skip_around skips around page' => sub {