Skip to content

Commit

Permalink
Add integration test for requests with URI-encoded fcr:metadata suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Oct 7, 2014
1 parent 91a5c24 commit 26758b0
Showing 1 changed file with 15 additions and 1 deletion.
Expand Up @@ -213,7 +213,6 @@ public void testOptionsBinary() throws Exception {
assertResourceOptionsHeaders(optionsResponse);
}


@Test
public void testOptionsBinaryMetadata() throws Exception {
final String pid = getRandomUniquePid();
Expand All @@ -229,6 +228,21 @@ public void testOptionsBinaryMetadata() throws Exception {
assertRdfOptionsHeaders(optionsResponse);
}

@Test
public void testOptionsBinaryMetadataWithUriEncoding() throws Exception {
final String pid = getRandomUniquePid();

createDatastream(pid, "x", pid);

final String location = serverAddress + pid + "/x/fcr%3Ametadata";

final HttpOptions optionsRequest = new HttpOptions(location);
final HttpResponse optionsResponse = client.execute(optionsRequest);
assertEquals(OK.getStatusCode(), optionsResponse.getStatusLine().getStatusCode());

assertRdfOptionsHeaders(optionsResponse);
}

private void assertContainerOptionsHeaders(final HttpResponse httpResponse) {
assertRdfOptionsHeaders(httpResponse);
final List<String> methods = headerValues(httpResponse,"Allow");
Expand Down

0 comments on commit 26758b0

Please sign in to comment.