17 lines
410 B
Ruby
17 lines
410 B
Ruby
# frozen_string_literal: true
|
|
|
|
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 login_path
|
|
end
|
|
end
|