diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-09-19 10:07:12 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-10-03 15:53:29 +0100 |
commit | 1ada9ee8ca6ba10bd6b3c7fb02f7b5599972db5c (patch) | |
tree | 894ef51a1eca70bb9a93a25dd0b4d38a0904463b /t/app/controller/admin | |
parent | c73fc63cb5cb516377ed2638bbd607dbd4357bd5 (diff) |
Per-test file email addresses.
Diffstat (limited to 't/app/controller/admin')
-rw-r--r-- | t/app/controller/admin/update_edit.t | 14 | ||||
-rw-r--r-- | t/app/controller/admin/users.t | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/t/app/controller/admin/update_edit.t b/t/app/controller/admin/update_edit.t index cf371651b..57c8973d4 100644 --- a/t/app/controller/admin/update_edit.t +++ b/t/app/controller/admin/update_edit.t @@ -83,7 +83,7 @@ for my $test ( state => 'confirmed', name => '', anonymous => 1, - username => 'test@example.com', + username => $update->user->email, }, changes => { text => 'this is a changed update', @@ -98,7 +98,7 @@ for my $test ( state => 'confirmed', name => '', anonymous => 1, - username => 'test@example.com', + username => $update->user->email, }, changes => { name => 'A User', @@ -113,7 +113,7 @@ for my $test ( state => 'confirmed', name => 'A User', anonymous => 1, - username => 'test@example.com', + username => $update->user->email, }, changes => { anonymous => 0, @@ -128,10 +128,10 @@ for my $test ( state => 'confirmed', name => 'A User', anonymous => 0, - username => 'test@example.com', + username => $update->user->email, }, changes => { - username => 'test2@example.com', + username => $user2->email, }, log_count => 4, log_entries => [qw/edit edit edit edit/], @@ -144,7 +144,7 @@ for my $test ( state => 'confirmed', name => 'A User', anonymous => 0, - username => 'test2@example.com', + username => $user2->email, }, changes => { state => 'unconfirmed', @@ -159,7 +159,7 @@ for my $test ( state => 'unconfirmed', name => 'A User', anonymous => 0, - username => 'test2@example.com', + username => $user2->email, }, changes => { text => 'this is a twice changed update', diff --git a/t/app/controller/admin/users.t b/t/app/controller/admin/users.t index b6da170ba..7361ab619 100644 --- a/t/app/controller/admin/users.t +++ b/t/app/controller/admin/users.t @@ -264,7 +264,7 @@ FixMyStreet::override_config { desc => 'edit user name', fields => { name => '', - email => 'test@example.com', + email => $user->email, email_verified => 1, body => $haringey->id, phone => '', @@ -285,7 +285,7 @@ FixMyStreet::override_config { desc => 'edit user email', fields => { name => 'Changed User', - email => 'test@example.com', + email => $user->email, email_verified => 1, body => $haringey->id, phone => '', @@ -464,7 +464,7 @@ FixMyStreet::override_config { $mech->create_problems_for_body(2, 2514, 'Title', { user => $existing_user }); my $count = FixMyStreet::DB->resultset('Problem')->search({ user_id => $user->id })->count; $mech->get_ok( '/admin/users/' . $user->id ); - $mech->submit_form_ok( { with_fields => { email => 'existing@example.com' } }, 'submit email change' ); + $mech->submit_form_ok( { with_fields => { email => $existing_user->email } }, 'submit email change' ); is $mech->uri->path, '/admin/users/' . $existing_user->id, 'redirected'; my $p = FixMyStreet::DB->resultset('Problem')->search({ user_id => $existing_user->id })->count; is $p, $count + 2, 'reports merged'; @@ -518,7 +518,7 @@ subtest "Send login email from admin for unverified email" => sub { is $email->header('Subject'), "Your FixMyStreet account details", "subject is correct"; - is $email->header('To'), 'test@example.com', "to is correct"; + is $email->header('To'), $user->email, "to is correct"; my $link = $mech->get_link_from_email($email); |