Update rest assured version

This commit is contained in:
René Pfeuffer
2020-05-19 21:57:55 +02:00
parent 2daba94473
commit b12b1ca5fe
3 changed files with 8 additions and 8 deletions

View File

@@ -102,7 +102,7 @@
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>3.1.0</version>
<version>4.3.0</version>
<scope>test</scope>
</dependency>

View File

@@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package sonia.scm.it;
import org.apache.http.HttpStatus;
@@ -66,7 +66,7 @@ public class RoleITCase {
given(VndMediaType.REPOSITORY_ROLE)
.when()
.content("{" +
.body("{" +
"\"name\": \"" + ROLE_NAME + "\"," +
"\"verbs\": [\"read\",\"permissionRead\"]" +
"}")
@@ -84,7 +84,7 @@ public class RoleITCase {
given(VndMediaType.REPOSITORY_PERMISSION)
.when()
.content("{\n" +
.body("{\n" +
"\t\"role\": \"" + ROLE_NAME + "\",\n" +
"\t\"name\": \"" + USER + "\",\n" +
"\t\"groupPermission\": false\n" +

View File

@@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package sonia.scm.it.utils;
import io.restassured.response.ValidatableResponse;
@@ -86,7 +86,7 @@ public class TestData {
String admin = isAdmin ? "true" : "false";
given(VndMediaType.USER)
.when()
.content(new StringBuilder()
.body(new StringBuilder()
.append(" {\n")
.append(" \"active\": true,\n")
.append(" \"admin\": ").append(admin).append(",\n")
@@ -124,7 +124,7 @@ public class TestData {
LOG.info("create group with group name: {} and description {}", groupName, desc);
given(VndMediaType.GROUP)
.when()
.content(getGroupJson(groupName,desc))
.body(getGroupJson(groupName,desc))
.post(getGroupsUrl())
.then()
.statusCode(HttpStatus.SC_CREATED)
@@ -136,7 +136,7 @@ public class TestData {
LOG.info("create permission with name {} and verbs {} using the endpoint: {}", username, verbs, defaultPermissionUrl);
given(VndMediaType.REPOSITORY_PERMISSION)
.when()
.content("{\n" +
.body("{\n" +
"\t\"verbs\": " + verbs.stream().collect(Collectors.joining("\",\"", "[\"", "\"]")) + ",\n" +
"\t\"name\": \"" + username + "\",\n" +
"\t\"groupPermission\": false\n" +