diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-09 17:11:11 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-09 17:11:11 +0100 |
commit | fb26dda031a9409a1716c379d4a86327aa142dd7 (patch) | |
tree | 090c43814ed61b096f44e33035b3534a13b22a37 | |
parent | 535d43348eb062b4eb31bc37ae086d200bd921ab (diff) |
Stop empty string warning, delete some test users, and use same n/a string as elsewhere.
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 2 | ||||
-rw-r--r-- | t/app/controller/alert_new.t | 5 | ||||
-rw-r--r-- | templates/web/default/admin/index.html | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index ce9027c32..e5c924730 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -104,7 +104,7 @@ sub index : Path : Args(0) { $questionnaire_counts{total} ? sprintf( '%.1f', $questionnaire_counts{1} / $questionnaire_counts{total} * 100 ) - : 'na'; + : _('n/a'); $c->stash->{questionnaires} = \%questionnaire_counts; return 1; diff --git a/t/app/controller/alert_new.t b/t/app/controller/alert_new.t index 6fc32acbf..5bf7e31dd 100644 --- a/t/app/controller/alert_new.t +++ b/t/app/controller/alert_new.t @@ -208,6 +208,7 @@ foreach my $test ( param1 => 2651, param2 => 2651, confirmed => 0, + delete => 1, } ) { @@ -263,6 +264,10 @@ foreach my $test ( $mech->email_count_is( $test->{confirmed} ? 0 : 1 ); + if ( $test->{delete} ) { + $mech->delete_user($user); + $mech->delete_user($alert_user); + } }; } diff --git a/templates/web/default/admin/index.html b/templates/web/default/admin/index.html index 85b8c264f..59722a5ed 100644 --- a/templates/web/default/admin/index.html +++ b/templates/web/default/admin/index.html @@ -12,7 +12,7 @@ <ul> <li>[% tprintf( loc('<strong>%d</strong> live problems'), total_problems_live ) %]</li> - <li>[% tprintf( loc('%d live updates'), comments.confirmed ) %]</li> + <li>[% tprintf( loc('%d live updates'), comments.confirmed || 0 ) %]</li> <li>[% tprintf( loc('%d confirmed alerts, %d unconfirmed'), alerts.1, alerts.0) %]</li> <li>[% tprintf( loc('%d questionnaires sent – %d answered (%s%%)'), questionnaires.total, questionnaires.1, questionnaires_pc) %]</li> <li>[% tprintf( loc('%d council contacts – %d confirmed, %d unconfirmed'), contacts.total, contacts.1, contacts.0) %]</li> |