public void testDeletingChildNodeOfACheckedInNodeByOp()

in src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletVersionableTest.java [377:411]


    public void testDeletingChildNodeOfACheckedInNodeByOp() throws IOException {
        params.put(":checkinNewVersionableNodes", "true");
        params.put("child/testprop", "testvalue");
        final String location = testClient.createNode(postUrl + SlingPostConstants.DEFAULT_CREATE_SUFFIX, params);
        assertHttpStatus(location + DEFAULT_EXT, HttpServletResponse.SC_OK,
                "POST must redirect to created resource (" + location + ")");
        assertTrue("Node (" + location + ") must have generated name",
                !location.endsWith("/*"));
        assertTrue("Node (" + location + ") must created be under POST URL (" + postUrl + ")",
                location.contains(postUrl + "/"));

        String content = getContent(location + ".txt", CONTENT_TYPE_PLAIN);
        assertTrue("Node (" + location + ") should be checked in.",
                content.contains("jcr:isCheckedOut: false"));
        assertFalse("Node (" + location + ") shouldn't have a test property.",
                content.contains("testprop: testvalue"));

        content = getContent(location + "/child.txt", CONTENT_TYPE_PLAIN);
        assertFalse("Node (" + location + "/child) shouldn't be versionable be checked in.",
                content.contains("jcr:isCheckedOut: false"));
        assertTrue("Node (" + location + "/child) has a test property. ",
                content.contains("testprop: testvalue"));

        params.clear();
        params.put(":autoCheckout", "true");
        params.put(SlingPostConstants.RP_OPERATION, SlingPostConstants.OPERATION_DELETE);
        testClient.createNode(location+"/child", params);

        content = getContent(location + ".txt", CONTENT_TYPE_PLAIN);
        assertTrue("Node (" + location + ") should be checked in.",
                content.contains("jcr:isCheckedOut: false"));

        assertHttpStatus(location + "/child.txt", 404);

    }