mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-12-19 07:07:55 +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 {
|
||||
|
||||
@Test
|
||||
public void shouldStartWithAuthMeAdminPrefix() {
|
||||
public void shouldStartWithAuthMePrefix() {
|
||||
// given
|
||||
String requiredPrefix = "authme.admin.";
|
||||
String requiredPrefix = "authme.";
|
||||
|
||||
// when/then
|
||||
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
|
||||
public void shouldHaveUniqueNodes() {
|
||||
// given
|
||||
|
Loading…
Reference in New Issue
Block a user