This repository has been archived by the owner on Jul 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
if a user's email address is changed, also send an email to the old a…
…ddress
- Loading branch information
1 parent
26fc1bb
commit 7d9117e
Showing
2 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,15 +183,23 @@ subtest 'User' => sub { | |
{ email => '[email protected]' }, | ||
{ name => 'conch' }; | ||
|
||
$t->post_ok('/user/me', json => { email => 'rO_USer@cONCh.joyent.us', name => 'rO_USer' }) | ||
$t->post_ok('/user/me', json => { email => 'rO_USer_new@cONCh.joyent.us', name => 'rO_USer' }) | ||
->status_is(204) | ||
->location_is('/user/'.$ro_user->id) | ||
->email_cmp_deeply({ | ||
To => '"rO_USer" <[email protected]>', | ||
->email_cmp_deeply([ | ||
{ | ||
To => '"rO_USer" <[email protected]>', | ||
From => '[email protected]', | ||
Subject => 'Your Conch account has been updated', | ||
body => re(qr/^Your account at \Q$JOYENT\E has been updated:\R\R {7}email: ro_user\@conch.joyent.us -> rO_USer\@cONCh.joyent.us\R {8}name: ro_user -> rO_USer\R\R/m), | ||
}); | ||
body => re(qr/^Your account at \Q$JOYENT\E has been updated:\R\R {7}email: ro_user\@conch.joyent.us -> rO_USer_new\@cONCh.joyent.us\R {8}name: ro_user -> rO_USer\R\R/m), | ||
}, | ||
{ | ||
To => '"ro_user" <[email protected]>', | ||
From => '[email protected]', | ||
Subject => 'Your Conch account has been updated', | ||
body => re(qr/^Your account at \Q$JOYENT\E has been updated:\R\R {7}email: ro_user\@conch.joyent.us -> rO_USer_new\@cONCh.joyent.us\R {8}name: ro_user -> rO_USer\R\R/m), | ||
}, | ||
]); | ||
|
||
$ro_user->discard_changes; | ||
|
||
|