diff options
author | M Somerville <matthew-github@dracos.co.uk> | 2020-09-24 14:39:59 +0100 |
---|---|---|
committer | M Somerville <matthew-github@dracos.co.uk> | 2020-09-25 13:28:14 +0100 |
commit | 22cc2b0e1e6bb2dd7bde7231ad7f7190737ce545 (patch) | |
tree | eef5e92b23415c4d90ac23dd59f0601f7d7abe27 /t/app/controller/auth_social.t | |
parent | 85a6b7df9bd0b1711637b39d5a63ed6434686b33 (diff) |
Split up two username fields.
Rename the not-logging-in username field to username_register.
Keep the sign-in field as username because that e.g. overlaps
with auth code in two-factor authentication.
Diffstat (limited to 't/app/controller/auth_social.t')
-rw-r--r-- | t/app/controller/auth_social.t | 6 |
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'); |