Test cases: delete doc if exists