aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/report_new_text.t
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2018-10-23 11:08:18 +0100
committerStruan Donald <struan@exo.org.uk>2018-10-23 15:50:20 +0100
commita94e6feb1c2da0a2387f4e4c26cd0d6832a15116 (patch)
treecc6265a9cefd5ef9c736d3898b058a2545b66c5c /t/app/controller/report_new_text.t
parentc73e8b5485c4016921777b95582bbe92853f5e4c (diff)
use submitted phone number and email in login form
do not use details directly from user object because in the slim chance that the user has phone and email verified and there is a failed email login we display the phone number from the database.
Diffstat (limited to 't/app/controller/report_new_text.t')
-rw-r--r--t/app/controller/report_new_text.t4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/app/controller/report_new_text.t b/t/app/controller/report_new_text.t
index cb07e57ee..8b7805c31 100644
--- a/t/app/controller/report_new_text.t
+++ b/t/app/controller/report_new_text.t
@@ -222,6 +222,8 @@ subtest "test password errors for a user who is signing in as they report" => su
ALLOWED_COBRANDS => [ { fixmystreet => '.' } ],
MAPIT_URL => 'http://mapit.uk/',
SMS_AUTHENTICATION => 1,
+ phone_verified => 1,
+ email_verified => 1,
}, sub {
$mech->submit_form_ok( { with_fields => { pc => 'EH1 1BB', } }, "submit location" );
$mech->follow_link_ok( { text_regex => qr/skip this step/i, }, "follow 'skip this step' link" );
@@ -245,6 +247,8 @@ subtest "test password errors for a user who is signing in as they report" => su
is_deeply $mech->page_errors, [
"There was a problem with your login information. If you cannot remember your password, or do not have one, please fill in the \x{2018}No\x{2019} section of the form.",
], "check there were errors";
+
+ $mech->content_lacks($user->email, 'email not displayed');
};
subtest "test report creation for a user who is signing in as they report" => sub {