aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHakim Cassimally <hakim@mysociety.org>2013-12-10 16:25:10 +0000
committerHakim Cassimally <hakim@mysociety.org>2013-12-10 16:25:10 +0000
commit730abb82c55b7fe15aa9fe8c05ed1af6b522dc0c (patch)
tree0da52400a51844ab45d4b0ff54cd51fdaf74b137
parent02ef3db41eba92dbb3d058bf31b7833c0a9c774d (diff)
[Zurich] also allow hidden reports for closed_overdue
-rw-r--r--perllib/FixMyStreet/Cobrand/Zurich.pm2
-rw-r--r--t/cobrand/zurich.t4
2 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm
index 5de1e041a..b3e288bc4 100644
--- a/perllib/FixMyStreet/Cobrand/Zurich.pm
+++ b/perllib/FixMyStreet/Cobrand/Zurich.pm
@@ -741,7 +741,7 @@ sub admin_stats {
# Reports solved within 5 days (sent back from subdiv)
my $subdiv_dealtwith = $c->model('DB::Problem')->search( { extra => { like => '%subdiv_overdue,I1:0%' }, %params } )->count;
# Reports solved within 5 days (marked as 'fixed - council', 'closed', or 'hidden'
- my $fixed_in_time = $c->model('DB::Problem')->search( { extra => { like => '%closed_overdue,I1:0%' }, %params } )->count;
+ my $fixed_in_time = $c->model('DB::Problem')->search( { extra => { like => '%closed_overdue,I1:0%' }, %date_params } )->count;
# Reports per category
my $per_category = $c->model('DB::Problem')->search( \%params, {
select => [ 'category', { count => 'id' } ],
diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t
index 8dde27b02..6fd6677f5 100644
--- a/t/cobrand/zurich.t
+++ b/t/cobrand/zurich.t
@@ -180,7 +180,7 @@ sub get_moderated_count {
return $1;
}
else {
- fail "Could not get moderation results";
+ fail sprintf "Could not get moderation results (%d)", $mech->status;
return undef;
}
}
@@ -622,7 +622,7 @@ subtest "test stats" => sub {
is $mech->res->code, 200, "superuser should be able to see stats page";
$mech->content_contains('Innerhalb eines Arbeitstages moderiert: 2'); # now including hidden
- $mech->content_contains('Innerhalb von f&uuml;nf Arbeitstagen abgeschlossen: 2');
+ $mech->content_contains('Innerhalb von f&uuml;nf Arbeitstagen abgeschlossen: 3');
# my @data = $mech->content =~ /(?:moderiert|abgeschlossen): \d+/g;
# diag Dumper(\@data); use Data::Dumper;