use of com.cloudogu.scm.review.pullrequest.service.ReviewMark in project scm-review-plugin by scm-manager.
the class PullRequestRootResourceTest method shouldGetMarkedAsReviewedPaths.
@Test
@SubjectAware(username = "dent")
public void shouldGetMarkedAsReviewedPaths() throws URISyntaxException, IOException {
mockLoggedInUser(new User("dent"));
PullRequest pullRequest = createPullRequest();
pullRequest.setAuthor("slarti");
pullRequest.setReviewMarks(ImmutableSet.of(new ReviewMark("/some/file", "dent"), new ReviewMark("/some/other/file", "trillian")));
when(store.get("1")).thenReturn(pullRequest);
MockHttpRequest request = MockHttpRequest.get("/" + PullRequestRootResource.PULL_REQUESTS_PATH_V2 + "/ns/repo/1");
dispatcher.invoke(request, response);
assertThat(response.getStatus()).isEqualTo(200);
assertThat(response.getContentAsString()).contains("\"markedAsReviewed\":[\"/some/file\"]");
}
Aggregations