added tests for deletion conditions