Write tests for delete method