15 lines
377 B
Ruby
15 lines
377 B
Ruby
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
|