diff options
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Zurich.pm | 2 | ||||
-rw-r--r-- | t/cobrand/zurich.t | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Zurich.pm b/perllib/FixMyStreet/Cobrand/Zurich.pm index 7068d3b03..c8af63987 100644 --- a/perllib/FixMyStreet/Cobrand/Zurich.pm +++ b/perllib/FixMyStreet/Cobrand/Zurich.pm @@ -174,7 +174,7 @@ sub updates_as_hashref { my $hashref = {}; - if (problem_has_public_response($problem)) { + if ($self->problem_has_public_response($problem)) { $hashref->{update_pp} = $self->prettify_dt( $problem->lastupdate ); if ( $problem->state ne 'external' ) { diff --git a/t/cobrand/zurich.t b/t/cobrand/zurich.t index f5c6b1145..eccb0c8eb 100644 --- a/t/cobrand/zurich.t +++ b/t/cobrand/zurich.t @@ -126,6 +126,15 @@ FixMyStreet::override_config { $mech->content_contains('Überprüfung ausstehend') or die $mech->content; +FixMyStreet::override_config { + ALLOWED_COBRANDS => [ 'zurich' ], + MAP_TYPE => 'Zurich,OSM', +}, sub { + my $json = $mech->get_ok_json( '/report/ajax/' . $report->id ); + is $json->{report}->{title}, "Überprüfung ausstehend", "correct title"; + is $json->{report}->{state}, "submitted", "correct state"; +}; + subtest "Banners are displayed correctly" => sub { FixMyStreet::override_config { ALLOWED_COBRANDS => [ 'zurich' ], |