mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 05:25:24 +02:00
Allow users to update their email address (#1745)
* Change email address * Email confirmation * Email change test * Lint * Schema reset * Set test email sender * Select specific user fixture * Refactor/cleanup * Remove unused email_confirmation_token * Current user would never be true * Fix translation test failures
This commit is contained in:
parent
46e86a9a11
commit
41873de11d
28 changed files with 225 additions and 15 deletions
14
test/mailers/email_confirmation_mailer_test.rb
Normal file
14
test/mailers/email_confirmation_mailer_test.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
require "test_helper"
|
||||
|
||||
class EmailConfirmationMailerTest < ActionMailer::TestCase
|
||||
test "confirmation_email" do
|
||||
user = users(:new_email)
|
||||
user.unconfirmed_email = "new@example.com"
|
||||
|
||||
mail = EmailConfirmationMailer.with(user: user).confirmation_email
|
||||
assert_equal I18n.t("email_confirmation_mailer.confirmation_email.subject"), mail.subject
|
||||
assert_equal [ user.unconfirmed_email ], mail.to
|
||||
assert_equal [ "hello@maybefinance.com" ], mail.from
|
||||
assert_match "confirm", mail.body.encoded
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue