aboutsummaryrefslogtreecommitdiffstats
path: root/t/app
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-08-01 11:30:53 +0100
committerStruan Donald <struan@exo.org.uk>2013-08-01 11:30:53 +0100
commit094e926d6c62bc8e9e45e69ec256744cda169d7d (patch)
tree175c02563e3386a89461d63c77f76a541f628920 /t/app
parente7c62cbd10d8d751b816517939ccf466f5e804dd (diff)
Send back a list of titles in new report ajax details
This is so that the mobile app can use the list to build the appropriate UI as fixing the HTML that is sent for the site is too awful.
Diffstat (limited to 't/app')
-rw-r--r--t/app/controller/report_new.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index 818f9e625..8e129a41c 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -921,8 +921,13 @@ subtest "test report creation for a category that is non public" => sub {
$contact2->category( "Pothol\xc3\xa9s" );
$contact2->update;
-$mech->get_ok( '/report/new/ajax?latitude=' . $saved_lat . '&longitude=' . $saved_lon );
+
+my $extra_details = $mech->get_ok_json( '/report/new/ajax?latitude=' . $saved_lat . '&longitude=' . $saved_lon );
$mech->content_contains( "Pothol\xc3\xa9s" );
+ok !$extra_details->{titles_list}, 'Non Bromley does not send back list of titles';
+
+$extra_details = $mech->get_ok_json( '/report/new/ajax?latitude=51.4021&longitude=0.01578');
+ok $extra_details->{titles_list}, 'Bromley sends back list of titles';
#### test uploading an image