test/integration/user_delete_test.rb
# Helper method applicable to successfull user delete tests.
Helper method applicable to successfull user delete tests.
Helper method applicable to successfull user delete tests .
def delete_user_by(user)
    log_in_as(user)
    assert_difference 'User.count', -1 do
      delete user_path(@user)
    end
    assert_redirected_to users_path
    follow_redirect!
    assert_flash_notices success: { count: 1 }
  end
def delete_user_by ( user ) log_in_as ( user ) assert_difference 'User.count' , - 1 do delete user_path ( @user ) end assert_redirected_to users_path follow_redirect! assert_flash_notices success : { count : 1 } end
Helper method applicable to successfull user delete tests.
Helper method applicable to successfull user delete tests .
# Assert exactly one user has been deleted.
user
<not_specific>