aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_display.t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-09-21 11:41:23 +0100
committerStruan Donald <struan@exo.org.uk>2011-09-21 11:41:23 +0100
commitd941a8c26e943c941f8e37ecbd9a9982dd41cb70 (patch)
tree75ea20fb18e984912ba60e4e499114c83cf431fe /t/app/controller/report_display.t
parent9da2d7b0e806407e3ed5e5418a53fca64757a39a (diff)
parent77f31e8c96c727ea5ab9cf217cfd924074e8f3ed (diff)
Merge branch 'master' of ssh://git.mysociety.org/data/git/public/fixmystreet into js-validation
Conflicts: templates/web/default/report/display.html
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';