aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_display.t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-10-10 14:50:30 +0100
committerStruan Donald <struan@exo.org.uk>2011-10-10 14:50:30 +0100
commit6e7276b843fde5e0490c3859f4beb92538004c0e (patch)
tree51bbf37602f6f3c6c83eae8a80e22a5a99c49194 /t/app/controller/report_display.t
parenta8b2d90c78103024b58b1760db72ab5c9397511b (diff)
parent5eb4f4e746283b4e945b52745503baa4da4f345f (diff)
Merge remote branch 'origin/master' into open311-consumer
Diffstat (limited to 't/app/controller/report_display.t')
-rw-r--r--t/app/controller/report_display.t10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t
index a70d5b9e9..c7455a99b 100644
--- a/t/app/controller/report_display.t
+++ b/t/app/controller/report_display.t
@@ -193,8 +193,8 @@ for my $test (
description => 'new report',
date => DateTime->now,
state => 'confirmed',
- banner_id => '',
- banner_text => '',
+ banner_id => undef,
+ banner_text => undef,
fixed => 0
},
{
@@ -293,8 +293,10 @@ for my $test (
$mech->get_ok("/report/$report_id");
is $mech->uri->path, "/report/$report_id", "at /report/$report_id";
my $banner = $mech->extract_problem_banner;
- $banner->{text} =~ s/^ //g;
- $banner->{text} =~ s/ $//g;
+ if ( $banner->{text} ) {
+ $banner->{text} =~ s/^ //g;
+ $banner->{text} =~ s/ $//g;
+ }
is $banner->{id}, $test->{banner_id}, 'banner id';
is $banner->{text}, $test->{banner_text}, 'banner text';