Test delete function