Skip to content

Commit

Permalink
add a test for adding a datastream somewhere in the jcr tree
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed May 31, 2013
1 parent 4aa2394 commit 15f552e
Showing 1 changed file with 14 additions and 0 deletions.
Expand Up @@ -35,6 +35,20 @@ public void testAddDatastream() throws Exception {
"/FedoraDatastreamsTest2/zxc", location);
}

@Test
public void testAddDeepDatastream() throws Exception {
final HttpPost method =
postDSMethod("FedoraDatastreamsTest2/does/not/exist/yet", "zxc", "foo");
final HttpResponse response = client.execute(method);
final String location = response.getFirstHeader("Location").getValue();
assertEquals(201, response.getStatusLine().getStatusCode());
assertEquals(
"Got wrong URI in Location header for datastream creation!",
serverAddress + OBJECT_PATH.replace("/", "") +
"/FedoraDatastreamsTest2/does/not/exist/yet/zxc", location);
}


@Test
public void testPutDatastream() throws Exception {
final HttpPost objMethod = postObjMethod("FedoraDatastreamsTestPut");
Expand Down

0 comments on commit 15f552e

Please sign in to comment.