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/report_new_open311.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/report_new_open311.t')
-rw-r--r-- | t/app/controller/report_new_open311.t | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/t/app/controller/report_new_open311.t b/t/app/controller/report_new_open311.t index 9a8063a84..ebbb06567 100644 --- a/t/app/controller/report_new_open311.t +++ b/t/app/controller/report_new_open311.t @@ -108,7 +108,8 @@ my $empty_form = { photo3 => '', name => '', may_show_name => '1', - username => '', + username_register => '', + username => '', phone => '', category => '', password_sign_in => '', @@ -137,7 +138,7 @@ foreach my $test ( title => 'test', detail => 'test detail', name => 'Test User', - username => 'testopen311@example.com', + username_register => 'testopen311@example.com', category => 'Street lighting', number => 27, type => 'old', @@ -177,7 +178,7 @@ foreach my $test ( title => 'test', detail => 'test detail', name => 'Test User', - username => 'testopen311@example.com', + username_register => 'testopen311@example.com', size => 'big', colour => 'red', }, @@ -201,7 +202,7 @@ foreach my $test ( $mech->clear_emails_ok; # check that the user does not exist - my $test_email = $test->{submit_with}->{username}; + my $test_email = $test->{submit_with}->{username_register}; my $user = FixMyStreet::DB->resultset('User')->find( { email => $test_email } ); if ( $user ) { $user->problems->delete; @@ -452,7 +453,7 @@ subtest "Category extras includes form disabling string" => sub { # Test submission of whole form, switching back to a blocked category at the same time $mech->submit_form_ok({ with_fields => { category => 'Pothole', title => 'Title', detail => 'Detail', - username => 'testing@example.org', name => 'Testing Example', + username_register => 'testing@example.org', name => 'Testing Example', } }); $mech->content_contains('<div id="js-category-stopper" class="box-warning" role="alert" aria-live="assertive">'); $mech->content_contains('Please ring us!'); |