Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Removing FedoraVersions instance variable that was hiding superclass …
…instance
  • Loading branch information
escowles committed Nov 3, 2015
1 parent 9d28989 commit bba40c0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Expand Up @@ -77,7 +77,6 @@ public class FedoraVersions extends ContentExposingResource {
protected String label;
protected String pathIntoVersion;

protected FedoraResource resource;
protected FedoraResource baseResource;

/**
Expand Down
Expand Up @@ -458,7 +458,19 @@ public void testDatastreamAutoMixinAndRevert() throws IOException {
// creating a version should succeed
final HttpPost httpPost = new HttpPost(serverAddress + pid + "/" + dsid + "/fcr:versions");
httpPost.setHeader("Slug", versionLabel);
assertEquals(CREATED.getStatusCode(), getStatus(httpPost));
try (final CloseableHttpResponse response = execute(httpPost)) {
assertEquals(CREATED.getStatusCode(), getStatus(response));
final String dsVersionURI = getLocation(response);
assertNotNull("No version location header found", dsVersionURI);
// version triples should not have fcr:metadata as the subject
try (final CloseableGraphStore dsVersionProperties = getContent(dsVersionURI)) {
System.out.println("XXX: " + dsVersionProperties);
assertTrue("Should have triples about the datastream", dsVersionProperties.contains(ANY,
createURI(dsVersionURI.replaceAll("/fcr:metadata","")), ANY, ANY));
assertFalse("Shouldn't have triples about fcr:metadata", dsVersionProperties.contains(ANY,
createURI(dsVersionURI), ANY, ANY));
}
}
// datastream should then have versions endpoint
assertEquals(OK.getStatusCode(), getStatus(new HttpGet(serverAddress + pid + "/" + dsid + "/fcr:versions")));
// datastream should then be versionable
Expand Down

0 comments on commit bba40c0

Please sign in to comment.