aboutsummaryrefslogtreecommitdiffstats
path: root/t/app
diff options
context:
space:
mode:
Diffstat (limited to 't/app')
-rw-r--r--t/app/controller/report_new.t7
-rw-r--r--t/app/model/problem.t3
2 files changed, 8 insertions, 2 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
diff --git a/t/app/model/problem.t b/t/app/model/problem.t
index 6ba2bbde4..7daa653fc 100644
--- a/t/app/model/problem.t
+++ b/t/app/model/problem.t
@@ -596,13 +596,14 @@ subtest 'check can turn on report sent email alerts' => sub {
$problem->discard_changes;
$problem->update( {
- council => 2651,
+ bodies_str => 2651,
state => 'confirmed',
confirmed => \'ms_current_timestamp()',
whensent => undef,
category => 'potholes',
name => 'Test User',
cobrand => 'fixmystreet',
+ send_fail_count => 0,
} );
my $m = new Test::MockModule(