Fixed admin permission tests

This commit is contained in:
Tim Visée 2015-12-01 16:40:00 +01:00
parent ccb9e24ce5
commit 7ac39d80fd

View File

@ -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