test before delete