Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for version reversion. #279

Merged
merged 3 commits into from Apr 10, 2014
Merged

Conversation

mikedurbin
Copy link
Contributor

No description provided.

final String objId = UUID.randomUUID().toString();
final HttpPatch patch = new HttpPatch(serverAddress + objId + "/fcr:versions/invalid-version-label");
execute(patch);
assertEquals(NOT_FOUND.getStatusCode(), getStatus(patch));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this just getting a 404 because objId (presumably) doesn't exist?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... missing a line in there to actually create the node. It seemed a little bit too convenient that this worked without additional code. I'll be submitting an update to the PR once I get this test corrected and then passing.

assertNotNull(response);
}

@Test
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to get into the pattern of using:
@test(expected = RuntimeException.class)

...instead of the pattern:
try{
...
fail()
} catch ()
}

@awoods
Copy link

awoods commented Apr 10, 2014

Resolved with: 7df0138

Addresses: https://www.pivotaltracker.com/story/show/60883346

awoods pushed a commit that referenced this pull request Apr 10, 2014
Added support for version reversion.
@awoods awoods merged commit 83ff331 into fcrepo:master Apr 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants