aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_new_mobile.t
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2020-09-29 14:23:52 +0200
committerMarius Halden <marius.h@lden.org>2020-09-29 14:23:52 +0200
commita27ce1524d801d2742a2bdb6ec1da45126d64353 (patch)
tree64123c4e17dc1776aa0a7cd65ee01d49d3e7d978 /t/app/controller/report_new_mobile.t
parent377bd96aab7cad3434185c30eb908c9da447fe40 (diff)
parent2773c60226b9370fe8ee00f7b205b571bb87c3b5 (diff)
Merge tag 'v3.0.1' into fiksgatami-dev
Diffstat (limited to 't/app/controller/report_new_mobile.t')
-rw-r--r--t/app/controller/report_new_mobile.t5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/app/controller/report_new_mobile.t b/t/app/controller/report_new_mobile.t
index 296007ce3..def140a72 100644
--- a/t/app/controller/report_new_mobile.t
+++ b/t/app/controller/report_new_mobile.t
@@ -15,21 +15,20 @@ subtest "Check signed up for alert when logged in" => sub {
MAPIT_URL => 'http://mapit.zurich',
MAPIT_TYPES => [ 'O08' ],
}, sub {
- $mech->log_in_ok('user@example.org');
+ my $user = $mech->log_in_ok('user@example.org');
$mech->post_ok( '/report/new/mobile', {
service => 'iPhone',
title => 'Title',
detail => 'Problem detail',
lat => 47.381817,
lon => 8.529156,
- email => 'user@example.org',
+ email => $user->email,
pc => '',
name => 'Name',
});
my $res = $mech->response;
ok $res->header('Content-Type') =~ m{^application/json\b}, 'response should be json';
- my $user = FixMyStreet::DB->resultset('User')->search({ email => 'user@example.org' })->first;
my $a = FixMyStreet::DB->resultset('Alert')->search({ user_id => $user->id })->first;
isnt $a, undef, 'User is signed up for alert';
};