tabletop-companion/test/controllers/account_verifications_contr...

15 lines
377 B
Ruby
Raw 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
assert_redirected_to root_url
end
end