aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/app/controller/report_display.t6
-rw-r--r--t/cobrand/zurich.t9
2 files changed, 15 insertions, 0 deletions
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t
index 605371ed7..17b9180c1 100644
--- a/t/app/controller/report_display.t
+++ b/t/app/controller/report_display.t
@@ -115,6 +115,12 @@ subtest "duplicate reports are signposted correctly" => sub {
$report2->update;
};
+subtest "test /report/ajax" => sub {
+ my $json = $mech->get_ok_json( "/report/ajax/$report_id" );
+ is $json->{report}->{title}, "Test 2", "correct title";
+ is $json->{report}->{state}, "confirmed", "correct state";
+};
+
subtest "test a good report" => sub {
$mech->get_ok("/report/$report_id");
is $mech->uri->path, "/report/$report_id", "at /report/$report_id";
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' ],