diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index eb1df74de..f1eb661e1 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -40,6 +40,7 @@ class UsersController < ApplicationController end def edit_password + @minimum_password_length = User.password_length.min render "devise/passwords/edit" end diff --git a/spec/requests/users_controller_spec.rb b/spec/requests/users_controller_spec.rb index 260c6a309..f136250cb 100644 --- a/spec/requests/users_controller_spec.rb +++ b/spec/requests/users_controller_spec.rb @@ -168,9 +168,13 @@ RSpec.describe UsersController, type: :request do get "/users/#{user.id}/password/edit", headers: headers, params: {} end - it "show the edit password page" do + it "shows the edit password page" do expect(page).to have_content("Change your password") end + + it "shows the password requirements hint" do + expect(page).to have_css("#user-password-hint") + end end context "when the current user does not matches the user ID" do