improves expired password view
This commit is contained in:
@@ -55,16 +55,13 @@ module Devise
|
||||
def password_expired?
|
||||
self.password_changed_at < self.expire_password_after.ago
|
||||
end
|
||||
|
||||
end #module PasswordExpirable
|
||||
end
|
||||
|
||||
module SecureValidatable
|
||||
def self.included(base)
|
||||
base.extend ClassMethods
|
||||
assert_secure_validations_api!(base)
|
||||
|
||||
base.class_eval do
|
||||
|
||||
validate :current_equal_password_validation
|
||||
end
|
||||
end
|
||||
@@ -77,8 +74,6 @@ module Devise
|
||||
self.errors.add(:password, :equal_to_current_password) if dummy.valid_password?(self.password)
|
||||
end
|
||||
end
|
||||
|
||||
end #module SecureValidatable
|
||||
|
||||
end #module Models
|
||||
end #module Devise
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,4 +0,0 @@
|
||||
class AddPasswordExpired < ActiveRecord::Migration
|
||||
def change
|
||||
end
|
||||
end
|
||||
@@ -333,7 +333,6 @@ feature 'Users' do
|
||||
fill_in 'user_password_confirmation', with: '123456789'
|
||||
click_button 'Change your password'
|
||||
expect(page).to have_content "must be different than the current password."
|
||||
#expect(page).to have_content "You can not use the same password. Please choose another one."
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user