mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 15:49:39 +02:00
* 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
14 lines
521 B
Ruby
14 lines
521 B
Ruby
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
|