aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_display.t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-10-10 13:16:00 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-10-10 13:18:56 +0100
commit8f99184aec230770c62237e060bc9af02b06a3e6 (patch)
treead30669f52e22b99b6af923ecdb951a41bd1028c /t/app/controller/report_display.t
parent6ade3433e5fe25d7011a168946c492538fcc0653 (diff)
Add a test for duration_string.
Diffstat (limited to 't/app/controller/report_display.t')
-rw-r--r--t/app/controller/report_display.t13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t
index 17b9180c1..2fc4fde9f 100644
--- a/t/app/controller/report_display.t
+++ b/t/app/controller/report_display.t
@@ -129,6 +129,7 @@ subtest "test a good report" => sub {
'Reported by Test User at 15:47, Sat 16 April 2011',
'correct problem meta information';
$mech->content_contains('Test 2 Detail');
+ $mech->content_lacks('Sent to');
my $update_form = $mech->form_name('updateForm');
@@ -142,6 +143,18 @@ subtest "test a good report" => sub {
is $update_form->value($_), $fields{$_}, "$_ value" for keys %fields;
};
+subtest "test duration string" => sub {
+ $report->update({ whensent => \'current_timestamp' });
+ $mech->get_ok("/report/$report_id");
+ $mech->content_contains('Sent to Westminster');
+ FixMyStreet::override_config {
+ AREA_LINKS_FROM_PROBLEMS => 1,
+ }, sub {
+ $mech->get_ok("/report/$report_id");
+ $mech->content_contains('Sent to <a href="http://localhost/reports/Westminster+City+Council">Westminster');
+ };
+};
+
foreach my $meta (
{
anonymous => 'f',