expired password last
This commit is contained in:
@@ -319,21 +319,25 @@ feature 'Users' do
|
||||
|
||||
login_as(user)
|
||||
visit root_path
|
||||
|
||||
expect(page).to_not have_content "Your password is expired"
|
||||
end
|
||||
|
||||
scenario 'Admin with password expired trying to use same password' do
|
||||
user = create(:user, password_changed_at: Time.now - 1.year, password: '123456789')
|
||||
admin = create(:administrator, user: user)
|
||||
|
||||
login_as(admin.user)
|
||||
visit root_path
|
||||
visit root_path
|
||||
|
||||
expect(page).to have_content "Your password is expired"
|
||||
|
||||
fill_in 'user_current_password', with: 'judgmentday'
|
||||
fill_in 'user_password', with: '123456789'
|
||||
fill_in 'user_password_confirmation', with: '123456789'
|
||||
click_button 'Change your password'
|
||||
|
||||
expect(page).to have_content "must be different than the current password."
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user