mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-10 04:30:58 +01:00
Fixed admin permission tests
This commit is contained in:
parent
ccb9e24ce5
commit
7ac39d80fd
@ -13,9 +13,9 @@ import static org.junit.Assert.fail;
|
|||||||
public class AdminPermissionTest {
|
public class AdminPermissionTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldStartWithAuthMeAdminPrefix() {
|
public void shouldStartWithAuthMePrefix() {
|
||||||
// given
|
// given
|
||||||
String requiredPrefix = "authme.admin.";
|
String requiredPrefix = "authme.";
|
||||||
|
|
||||||
// when/then
|
// when/then
|
||||||
for (AdminPermission perm : AdminPermission.values()) {
|
for (AdminPermission perm : AdminPermission.values()) {
|
||||||
@ -25,6 +25,19 @@ public class AdminPermissionTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void shouldContainAdminBranch() {
|
||||||
|
// given
|
||||||
|
String requiredBranch = ".admin.";
|
||||||
|
|
||||||
|
// when/then
|
||||||
|
for (AdminPermission perm : AdminPermission.values()) {
|
||||||
|
if (!perm.getNode().contains(requiredBranch)) {
|
||||||
|
fail("The permission '" + perm + "' does not contain with the required branch '" + requiredBranch + "'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldHaveUniqueNodes() {
|
public void shouldHaveUniqueNodes() {
|
||||||
// given
|
// given
|
||||||
|
Loading…
Reference in New Issue
Block a user