Added testHasNotPermissionButIsOp in UserTest

This commit is contained in:
Florian CUNY 2019-02-08 21:25:40 +01:00
parent 2bec47ba90
commit af96055753

View File

@ -215,6 +215,16 @@ public class UserTest {
assertTrue(user.hasPermission("perm"));
}
/**
* Asserts that {@link User#hasPermission(String)} returns true when the user is op.
* @since 1.3.0
*/
@Test
public void testHasNotPermissionButIsOp() {
when(user.isOp()).thenReturn(true);
assertTrue(user.hasPermission(""));
}
@Test
public void testIsOnline() {
when(player.isOnline()).thenReturn(true);