mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 22:45:45 +01:00
#8771 implement integration tests
This commit is contained in:
@@ -19,15 +19,19 @@ public class RestUtil {
|
||||
public static final String ADMIN_USERNAME = "scmadmin";
|
||||
public static final String ADMIN_PASSWORD = "scmadmin";
|
||||
|
||||
public static RequestSpecification given(String mediaType) {
|
||||
return RestAssured.given()
|
||||
.contentType(mediaType)
|
||||
.accept(mediaType)
|
||||
.auth().preemptive().basic(ADMIN_USERNAME, ADMIN_PASSWORD);
|
||||
}
|
||||
|
||||
public static RequestSpecification given() {
|
||||
return RestAssured.given()
|
||||
.auth().preemptive().basic(ADMIN_USERNAME, ADMIN_PASSWORD);
|
||||
}
|
||||
|
||||
public static RequestSpecification given(String mediaType) {
|
||||
return given(mediaType, ADMIN_USERNAME, ADMIN_PASSWORD);
|
||||
}
|
||||
|
||||
public static RequestSpecification given(String mediaType, String username, String password) {
|
||||
return RestAssured.given()
|
||||
.contentType(mediaType)
|
||||
.accept(mediaType)
|
||||
.auth().preemptive().basic(username, password);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user