test/test_password_expirable.rb in devise-security-0.11.1 vs test/test_password_expirable.rb in devise-security-0.12.0
- old
+ new
@@ -8,18 +8,18 @@
teardown do
Devise.expire_password_after = 90.days
end
test 'password expires' do
- user = User.create password: 'password1', password_confirmation: 'password1'
+ user = User.create email: 'bob@microsoft.com', password: 'Password1', password_confirmation: 'Password1'
refute user.need_change_password?
user.update(password_changed_at: Time.now.ago(3.month))
assert user.need_change_password?
end
test 'override expire after at runtime' do
- user = User.new password: 'password1', password_confirmation: 'password1'
+ user = User.new email: 'bob@microsoft.com', password: 'Password1', password_confirmation: 'Password1'
user.instance_eval do
def expire_password_after
4.month
end
end