aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2020-01-08 15:55:36 +0000
committerStruan Donald <struan@exo.org.uk>2020-01-13 14:44:47 +0000
commitcd265e13d70affcff02a22159a5cafe762b08b1a (patch)
treef7ecd5755d39785cd57e9b5f52c3e07eddc03db0 /t
parent1750fb706ff9a88b3d3ddee78333ecb5f8d66cef (diff)
[UK] do not show unknown banner on fms pro sites
In theory these are never unknown so do not display this in report banner.
Diffstat (limited to 't')
-rw-r--r--t/app/controller/report_display.t42
1 files changed, 41 insertions, 1 deletions
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t
index ddd69f18c..fbb9d7b75 100644
--- a/t/app/controller/report_display.t
+++ b/t/app/controller/report_display.t
@@ -255,6 +255,39 @@ for my $test (
fixed => 0
},
{
+ cobrand => 'fixmystreet',
+ description => 'old open311 report',
+ date => DateTime->new(
+ year => 2009,
+ month => 6,
+ day => 12,
+ hour => 9,
+ minute => 43,
+ second => 12
+ ),
+ state => 'confirmed',
+ send_method => 'Open311',
+ banner_id => undef,
+ banner_text => undef,
+ fixed => 0
+ },
+ {
+ cobrand => 'westminster',
+ description => 'old westminster report',
+ date => DateTime->new(
+ year => 2009,
+ month => 6,
+ day => 12,
+ hour => 9,
+ minute => 43,
+ second => 12
+ ),
+ state => 'confirmed',
+ banner_id => undef,
+ banner_text => undef,
+ fixed => 0
+ },
+ {
description => 'old fixed report',
date => DateTime->new(
year => 2009,
@@ -370,9 +403,16 @@ for my $test (
$report->confirmed( $test->{date}->ymd . ' ' . $test->{date}->hms );
$report->lastupdate( $test->{date}->ymd . ' ' . $test->{date}->hms );
$report->state( $test->{state} );
+ $report->send_method_used( $test->{send_method} || undef );
$report->update;
- $mech->get_ok("/report/$report_id");
+ my $cobrands = $test->{cobrand} ? [ $test->{cobrand} ] : [];
+ FixMyStreet::override_config {
+ ALLOWED_COBRANDS => $cobrands,
+ MAPIT_URL => 'http://mapit.uk/',
+ }, sub {
+ $mech->get_ok("/report/$report_id");
+ };
is $mech->uri->path, "/report/$report_id", "at /report/$report_id";
my $banner = $mech->extract_problem_banner;
if ( $banner->{text} ) {