test profile fixed, delete method in api changed to take id and to return the object