fixes integration tests, which are relying on the admin flag

This commit is contained in:
Sebastian Sdorra
2019-03-13 15:56:40 +01:00
parent 1627518954
commit 1179fd37fa
2 changed files with 24 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ public class UserITCase {
.assertStatusCode(200)
.requestUser(newUser)
.assertStatusCode(200)
.assertAdmin(aBoolean -> assertThat(aBoolean).isEqualTo(Boolean.TRUE))
// we could no longer easily check if the user is an admin, because the admin flag is gone
.assertPassword(Assert::assertNull)
.requestChangePassword(newPassword)
.assertStatusCode(204);
@@ -36,7 +36,7 @@ public class UserITCase {
.requestIndexResource(newUser, newPassword)
.assertStatusCode(200)
.requestUser(newUser)
.assertAdmin(isAdmin -> assertThat(isAdmin).isEqualTo(Boolean.TRUE))
// we could no longer easily check if the user is an admin, because the admin flag is gone
.assertPassword(Assert::assertNull);
}
@@ -52,7 +52,7 @@ public class UserITCase {
.assertStatusCode(200)
.requestUser(newUser)
.assertStatusCode(200)
.assertAdmin(aBoolean -> assertThat(aBoolean).isEqualTo(Boolean.TRUE)) // the user anonymous is not an admin
// we could no longer easily check if the user is an admin, because the admin flag is gone
.assertPassword(Assert::assertNull)
.requestChangePassword(newPassword) // the oldPassword is not needed in the user resource
.assertStatusCode(204);
@@ -96,7 +96,7 @@ public class UserITCase {
.assertStatusCode(200)
.requestUser(newUser)
.assertStatusCode(200)
.assertAdmin(aBoolean -> assertThat(aBoolean).isEqualTo(Boolean.TRUE))
// we could no longer easily check if the user is an admin, because the admin flag is gone
.assertPassword(Assert::assertNull)
.assertType(s -> assertThat(s).isEqualTo(type))
.assertPasswordLinkDoesNotExists();