Details
-
Bug
-
Status: Closed
-
High
-
Resolution: Fixed
-
2.26.21, 3.2.4, 4.0.1, 4.1.0
-
None
-
None
-
0.5
-
Platform Sprint 137
Description
Please run the following unit-test.
import javax.jcr.Node; import javax.jcr.RepositoryException; import org.junit.Test; import org.onehippo.repository.mock.MockNode; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; public class TestMockNode { @Test public void testHasNode() throws RepositoryException { final MockNode root = MockNode.root(); final Node fooNode = root.addNode("foo", "hst:virtualhost"); assertThat(root.hasNode("foo"), is(true)); assertThat(root.hasNodes(), is(true)); fooNode.remove(); assertThat(root.getNodes().hasNext(), is(false)); assertThat(root.hasNodes(), is(false)); } }
After the child node 'foo' is removed, root.hasNode() should return false. However it still returns true.
Attachments
Issue Links
- relates to
-
HSTTWO-3733 Delete channel
- Closed