diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-06-29 14:18:39 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-07-02 16:55:06 +0100 |
commit | 419ed059989e7c0718de0dda436f1928200b6518 (patch) | |
tree | 00c8ff7cb957c4e99f9a1e0463ddd311fbde42e2 /t | |
parent | 6e3ea5f3fbc56919dd183276bfb84b1deef9c21c (diff) |
Show all fixed issues when staff uses map filter.
Diffstat (limited to 't')
-rw-r--r-- | t/app/controller/around.t | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/t/app/controller/around.t b/t/app/controller/around.t index 8eaba6450..02abefe7e 100644 --- a/t/app/controller/around.t +++ b/t/app/controller/around.t @@ -152,7 +152,7 @@ subtest 'check category, status and extra filtering works on /around' => sub { # Create one open and one fixed report in each category foreach my $category ( @$categories ) { $mech->create_contact_ok( category => $category, body_id => $body->id, email => "$category\@example.org" ); - foreach my $state ( 'confirmed', 'fixed' ) { + foreach my $state ( 'confirmed', 'fixed - user', 'fixed - council' ) { my %report_params = ( %$params, category => $category, @@ -165,7 +165,7 @@ subtest 'check category, status and extra filtering works on /around' => sub { 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'; + is scalar @$pins, 9, 'correct number of reports when no filters'; # Regression test for filter_category in /around URL FixMyStreet::override_config { @@ -177,7 +177,7 @@ subtest 'check category, status and extra filtering works on /around' => sub { $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'; + is scalar @$pins, 3, 'correct number of Pothole reports'; $json = $mech->get_ok_json( '/around?ajax=1&status=open&bbox=' . $bbox ); $pins = $json->{pins}; @@ -185,10 +185,10 @@ subtest 'check category, status and extra 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'; + is scalar @$pins, 2, '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" } }); + $cobrand->mock('display_location_extra_params', sub { { external_body => "Pothole-confirmed" } }); $json = $mech->get_ok_json( '/around?ajax=1&bbox=' . $bbox ); $pins = $json->{pins}; |