Soc/test/controllers/email_confirmations_control...

17 lines
500 B
Ruby
Raw Permalink Normal View History

2023-08-19 14:38:38 +00:00
require "test_helper"
class EmailConfirmationsControllerTest < ActionDispatch::IntegrationTest
test "should confirm user account" do
user = users(:unconfirmed_user)
assert user.requires_confirmation?
get confirm_email_url(
email: user.email,
confirmation_string: user.email_confirmation_string,
)
follow_redirect!
assert_includes @response.body, I18n.t("email_confirmations.email_confirmed")
user.reload
assert_not user.requires_confirmation?
end
end