mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
Added integration test
This commit is contained in:
@@ -16,8 +16,8 @@ import java.io.IOException;
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
|
||||||
import static java.lang.Thread.sleep;
|
import static java.lang.Thread.sleep;
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.Assert.assertNotNull;
|
||||||
import static sonia.scm.it.RestUtil.given;
|
import static sonia.scm.it.RestUtil.given;
|
||||||
@@ -98,6 +98,7 @@ public class RepositoryAccessITCase {
|
|||||||
.statusCode(HttpStatus.SC_OK)
|
.statusCode(HttpStatus.SC_OK)
|
||||||
.extract()
|
.extract()
|
||||||
.path("files.find{it.name=='a.txt'}._links.self.href");
|
.path("files.find{it.name=='a.txt'}._links.self.href");
|
||||||
|
|
||||||
given()
|
given()
|
||||||
.when()
|
.when()
|
||||||
.get(rootContentUrl)
|
.get(rootContentUrl)
|
||||||
@@ -112,6 +113,14 @@ public class RepositoryAccessITCase {
|
|||||||
.statusCode(HttpStatus.SC_OK)
|
.statusCode(HttpStatus.SC_OK)
|
||||||
.extract()
|
.extract()
|
||||||
.path("files.find{it.name=='subfolder'}._links.self.href");
|
.path("files.find{it.name=='subfolder'}._links.self.href");
|
||||||
|
String selfOfSubfolderUrl = given()
|
||||||
|
.when()
|
||||||
|
.get(subfolderSourceUrl)
|
||||||
|
.then()
|
||||||
|
.statusCode(HttpStatus.SC_OK)
|
||||||
|
.extract()
|
||||||
|
.path("_links.self.href");
|
||||||
|
assertThat(subfolderSourceUrl).isEqualTo(selfOfSubfolderUrl);
|
||||||
String subfolderContentUrl = given()
|
String subfolderContentUrl = given()
|
||||||
.when()
|
.when()
|
||||||
.get(subfolderSourceUrl)
|
.get(subfolderSourceUrl)
|
||||||
|
|||||||
Reference in New Issue
Block a user