diff options
author | Marius Halden <marius.h@lden.org> | 2018-06-07 13:28:45 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2018-06-07 13:28:45 +0200 |
commit | 956f8b8a065824f9a9dc379eba1d0aa8b1b669cf (patch) | |
tree | 49f9ccb147b18dddee97500d4df7a3fb3dd3737c /t/app/controller/around.t | |
parent | 782457d016084c8de04989dbc824a71899f8b41b (diff) | |
parent | 4dbf5371f79c5f290c08e561ba2c881e96b58669 (diff) |
Merge tag 'v2.3.3' into fiksgatami-dev
Diffstat (limited to 't/app/controller/around.t')
-rw-r--r-- | t/app/controller/around.t | 10 |
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 { |