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

17 lines
410 B
Ruby
Raw Normal View History

2024-05-26 10:45:10 +00:00
# frozen_string_literal: true
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