diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-09-08 20:59:43 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-09-08 20:59:43 +0100 |
commit | 948c591f80f6d79d8442da309f5173357d116ceb (patch) | |
tree | 80e406ec0a91ffcfc8e9c1cd7a27d96ef1a727d1 /t/app/controller/report_display.t | |
parent | 5ed1e811cd31616cb591691a72b80b0bbbb5a002 (diff) |
Fix tests, and remove unwanted height.
Diffstat (limited to 't/app/controller/report_display.t')
-rw-r--r-- | t/app/controller/report_display.t | 10 |
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'; |