Forg/test/controllers/account_verifications_contr...

15 lines
379 B
Ruby
Raw Permalink Normal View History

2024-04-14 19:01:32 +00:00
require "test_helper"
class AccountVerificationsControllerTest < ActionDispatch::IntegrationTest
test "should verify email" do
user = users(:unverified)
token = user.generate_token_for(:email_verification)
assert_emails(+1) do
get account_verification_url(token)
end
user.reload
assert user.verified
2024-04-21 14:01:10 +00:00
assert_redirected_to login_path
2024-04-14 19:01:32 +00:00
end
end