test cleanup
This commit is contained in:
@ -74,5 +74,16 @@ module Admin
|
||||
assert_redirected_to admin_auth_path
|
||||
assert_match(/reset.*log/i, flash[:success])
|
||||
end
|
||||
|
||||
test "should fail to reset with mistyped password" do
|
||||
user = users(:admin)
|
||||
user.setup_reset
|
||||
|
||||
post admin_reset_password_url, params: { auth:
|
||||
{ reset_token: user.reset_token, password: '12345', password_confirmation: 'abcde' } }
|
||||
|
||||
assert :success
|
||||
assert flash[:error]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -22,5 +22,11 @@ module Admin
|
||||
assert_redirected_to admin_profile_url
|
||||
assert flash[:success]
|
||||
end
|
||||
|
||||
test "should FAIL update" do
|
||||
post admin_profile_url, params: { user: { name: '' } }
|
||||
assert :success
|
||||
assert flash[:error]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user