mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
Adapt test to changed API
This commit is contained in:
@@ -109,7 +109,7 @@ class AnnotateResourceTest extends RepositoryTestBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void test() throws URISyntaxException, UnsupportedEncodingException, JsonProcessingException {
|
void shouldReturnAnnotations() throws URISyntaxException, UnsupportedEncodingException, JsonProcessingException {
|
||||||
MockHttpRequest request = MockHttpRequest
|
MockHttpRequest request = MockHttpRequest
|
||||||
.get("/" + RepositoryRootResource.REPOSITORIES_PATH_V2 + NAMESPACE_AND_NAME + "/annotate/" + REVISION + "/" + PATH);
|
.get("/" + RepositoryRootResource.REPOSITORIES_PATH_V2 + NAMESPACE_AND_NAME + "/annotate/" + REVISION + "/" + PATH);
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ class AnnotateResourceTest extends RepositoryTestBase {
|
|||||||
String content = response.getContentAsString();
|
String content = response.getContentAsString();
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
JsonNode jsonNode = mapper.readTree(content);
|
JsonNode jsonNode = mapper.readTree(content);
|
||||||
JsonNode blameLines = jsonNode.get("blameLines");
|
JsonNode blameLines = jsonNode.get("lines");
|
||||||
assertThat(blameLines.isArray()).isTrue();
|
assertThat(blameLines.isArray()).isTrue();
|
||||||
assertThat(jsonNode.get("_links").get("self").get("href").asText())
|
assertThat(jsonNode.get("_links").get("self").get("href").asText())
|
||||||
.isEqualTo("/v2/repositories/space/X/annotate/123/some%2Ffile");
|
.isEqualTo("/v2/repositories/space/X/annotate/123/some%2Ffile");
|
||||||
|
|||||||
Reference in New Issue
Block a user