mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 07:55:47 +01:00
merge
This commit is contained in:
@@ -254,6 +254,41 @@ public class RepositoryAccessITCase {
|
||||
assertThat(changesets).size().isBetween(2, 3); // svn has an implicit root revision '0' that is extra to the two commits
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldFindDiffs() throws IOException {
|
||||
RepositoryClient repositoryClient = RepositoryUtil.createRepositoryClient(repositoryType, folder);
|
||||
|
||||
RepositoryUtil.createAndCommitFile(repositoryClient, "scmadmin", "a.txt", "a");
|
||||
RepositoryUtil.createAndCommitFile(repositoryClient, "scmadmin", "b.txt", "b");
|
||||
|
||||
String changesetsUrl = given()
|
||||
.when()
|
||||
.get(TestData.getDefaultRepositoryUrl(repositoryType))
|
||||
.then()
|
||||
.statusCode(HttpStatus.SC_OK)
|
||||
.extract()
|
||||
.path("_links.changesets.href");
|
||||
|
||||
String diffUrl = given()
|
||||
.when()
|
||||
.get(changesetsUrl)
|
||||
.then()
|
||||
.statusCode(HttpStatus.SC_OK)
|
||||
.extract()
|
||||
.path("_embedded.changesets[0]._links.diff.href");
|
||||
|
||||
given()
|
||||
.when()
|
||||
.get(diffUrl)
|
||||
.then()
|
||||
.statusCode(HttpStatus.SC_OK)
|
||||
.extract()
|
||||
.body()
|
||||
.asString()
|
||||
.contains("diff");
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void shouldFindFileHistory() throws IOException {
|
||||
|
||||
Reference in New Issue
Block a user