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