aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller/auth_social.t
diff options
context:
space:
mode:
authorM Somerville <matthew-github@dracos.co.uk>2020-09-30 20:04:05 +0100
committerM Somerville <matthew-github@dracos.co.uk>2020-09-30 20:04:05 +0100
commit3a511f5facc4bd066f0e7e4d00060979686bb766 (patch)
tree9438a2b3de8f2784e9ee588bb8b4b871f152213e /t/app/controller/auth_social.t
parentb6fb09db4ff31aba28833b9e735e6c92ce9081c7 (diff)
parent2abe443efb8bbbd7cf3048eec271fd28a777932f (diff)
Merge branch 'improved-email-phone-in-form'
Diffstat (limited to 't/app/controller/auth_social.t')
-rw-r--r--t/app/controller/auth_social.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/app/controller/auth_social.t b/t/app/controller/auth_social.t
index 1f6889dcc..9d1ea836f 100644
--- a/t/app/controller/auth_social.t
+++ b/t/app/controller/auth_social.t
@@ -241,7 +241,8 @@ for my $state ( 'refused', 'no email', 'existing UID', 'okay' ) {
$mech->content_contains('We need your email address, please give it below.');
# We don't have an email, so check that we can still submit it,
# and the ID carries through the confirmation
- $fields->{username} = $test->{email};
+ $fields->{username} = $test->{email} if $page eq 'my';
+ $fields->{username_register} = $test->{email} unless $page eq 'my';
$fields->{name} = 'Ffion Tester' unless $page eq 'my';
$mech->submit_form(with_fields => $fields, $page eq 'my' ? (button => 'sign_in_by_code') : ());
$mech->content_contains('Nearly done! Now check your email');
@@ -408,7 +409,8 @@ for my $tw_state ( 'refused', 'existing UID', 'no email' ) {
$mech->content_contains('We need your email address, please give it below.');
# We don't have an email, so check that we can still submit it,
# and the ID carries through the confirmation
- $fields->{username} = $tw_email;
+ $fields->{username_register} = $tw_email unless $page eq 'my';
+ $fields->{username} = $tw_email if $page eq 'my';
$fields->{name} = 'Ffion Tester' unless $page eq 'my';
$mech->submit_form(with_fields => $fields, $page eq 'my' ? (button => 'sign_in_by_code') : ());
$mech->content_contains('Nearly done! Now check your email');