post :grant, :params => { :display_name => "non_existent_user", :role => role }
end
assert_response :not_found
post :grant, :params => { :display_name => "non_existent_user", :role => role }
end
assert_response :not_found
assert_select "h1", "The user non_existent_user does not exist"
# Granting a role to a user that already has it should fail
assert_select "h1", "The user non_existent_user does not exist"
# Granting a role to a user that already has it should fail
post :revoke, :params => { :display_name => "non_existent_user", :role => role }
end
assert_response :not_found
post :revoke, :params => { :display_name => "non_existent_user", :role => role }
end
assert_response :not_found
assert_select "h1", "The user non_existent_user does not exist"
# Removing a role from a user that doesn't have it should fail
assert_select "h1", "The user non_existent_user does not exist"
# Removing a role from a user that doesn't have it should fail