aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_display.t
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2019-10-30 19:28:55 +0100
committerMarius Halden <marius.h@lden.org>2019-10-30 19:28:55 +0100
commit377bd96aab7cad3434185c30eb908c9da447fe40 (patch)
tree7ec5527e205d5b62caaa862a7de8cd25199c8bf0 /t/app/controller/report_display.t
parent56f61b1441070aa0b9ddcfc74aca46c20313609f (diff)
parent92b253904062edd533e55c22824de6fd01e2f7c1 (diff)
Merge tag 'v2.6' into fiksgatami-dev
Diffstat (limited to 't/app/controller/report_display.t')
-rw-r--r--t/app/controller/report_display.t20
1 files changed, 19 insertions, 1 deletions
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t
index 17b9180c1..bde090dd1 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="/reports/Westminster+City+Council">Westminster');
+ };
+};
+
foreach my $meta (
{
anonymous => 'f',
@@ -361,7 +374,12 @@ for my $test (
$banner->{text} =~ s/ $//g;
}
- is $banner->{id}, $test->{banner_id}, 'banner id';
+ if ( $test->{banner_id} ) {
+ ok $banner->{class} =~ /banner--$test->{banner_id}/i, 'banner class';
+ } else {
+ is $banner->{class}, $test->{banner_id}, 'banner class';
+ }
+
if ($test->{banner_text}) {
ok $banner->{text} =~ /$test->{banner_text}/i, 'banner text';
} else {