Sha256: 6a81ba02dea2eddce209f389a2b0beeec0b85dcef133d3bfde42b3653c1d641b
Contents?: true
Size: 1.09 KB
Versions: 3
Compression:
Stored size: 1.09 KB
Contents
require 'test_helper' class Auth::PasswordResetTest < ActionDispatch::IntegrationTest test 'reset password link screen can be rendered' do get password_request_path assert_response :success end test 'reset password link can be requested' do user = FactoryBot.create :user token = user.generate_token_for(:password_reset) email = UserMailer.with(user: user, token: token).reset_password post password_email_path, params: { email: user.email } assert_enqueued_email_with UserMailer, :reset_password, params: { user: user, token: token } do email.deliver_later end end test 'reset password screen can be rendered' do user = FactoryBot.create :user get password_reset_path(token: user.generate_token_for(:password_reset)) assert_response :success end test 'password can be reset_with_valid_token' do user = FactoryBot.create :user post password_store_path, params: { token: user.generate_token_for(:password_reset), password: 'password', password_confirmation: 'password' } assert_redirected_to login_path end end
Version data entries
3 entries across 3 versions & 1 rubygems