diff options
Diffstat (limited to 't/app/controller')
-rw-r--r-- | t/app/controller/report_display.t | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t index f0913fbd2..605371ed7 100644 --- a/t/app/controller/report_display.t +++ b/t/app/controller/report_display.t @@ -419,106 +419,6 @@ for my $test ( }; } -subtest "Zurich unconfirmeds are 200" => sub { - FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'zurich' ], - MAP_TYPE => 'Zurich,OSM', - }, sub { - $mech->host( 'zurich.example.com' ); - ok $report->update( { state => 'unconfirmed' } ), 'unconfirm report'; - $mech->get_ok("/report/$report_id"); - $mech->content_contains( 'Überprüfung ausstehend' ); - ok $report->update( { state => 'confirmed' } ), 'confirm report again'; - $mech->host( 'www.fixmystreet.com' ); - }; -}; - -subtest "Zurich banners are displayed correctly" => sub { - FixMyStreet::override_config { - ALLOWED_COBRANDS => [ 'zurich' ], - MAP_TYPE => 'Zurich,OSM', - }, sub { - $mech->host( 'zurich.example.com' ); - - for my $test ( - { - description => 'new report', - state => 'unconfirmed', - banner_id => 'closed', - banner_text => 'Erfasst' - }, - { - description => 'confirmed report', - state => 'confirmed', - banner_id => 'closed', - banner_text => 'Aufgenommen', - }, - { - description => 'fixed report', - state => 'fixed - council', - banner_id => 'fixed', - banner_text => 'Beantwortet', - }, - { - description => 'closed report', - state => 'closed', - banner_id => 'closed', - banner_text => _('Extern'), - }, - { - description => 'in progress report', - state => 'in progress', - banner_id => 'progress', - banner_text => 'In Bearbeitung', - }, - { - description => 'planned report', - state => 'planned', - banner_id => 'progress', - banner_text => 'In Bearbeitung', - }, - { - description => 'planned report', - state => 'planned', - banner_id => 'progress', - banner_text => 'In Bearbeitung', - }, - { - description => 'jurisdiction unknown', - state => 'unable to fix', - banner_id => 'fixed', - # We can't use _('Jurisdiction Unknown') here because - # TestMech::extract_problem_banner decodes the HTML entities before - # the string is passed back. - banner_text => 'Zust\x{e4}ndigkeit unbekannt', - }, - ) { - subtest "banner for $test->{description}" => sub { - $report->state( $test->{state} ); - $report->update; - - $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} ) { - $banner->{text} =~ s/^ //g; - $banner->{text} =~ s/ $//g; - } - - is $banner->{id}, $test->{banner_id}, 'banner id'; - if ($test->{banner_text}) { - like_string( $banner->{text}, qr/$test->{banner_text}/i, 'banner text is ' . $test->{banner_text} ); - } else { - is $banner->{text}, $test->{banner_text}, 'banner text'; - } - - }; - } - - $mech->host( 'www.fixmystreet.com' ); - }; -}; - my $oxfordshire = $mech->create_body_ok(2237, 'Oxfordshire County Council'); my $oxfordshireuser = $mech->create_user_ok('counciluser@example.com', name => 'Council User', from_body => $oxfordshire); |