mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-03-31 17:06:01 +02:00
Improved UserTest#testHasPermission()
This commit is contained in:
parent
acf87efd9b
commit
fbceaa51d3
@ -226,8 +226,12 @@ public class UserTest {
|
||||
|
||||
@Test
|
||||
public void testHasPermission() {
|
||||
when(player.hasPermission(anyString())).thenReturn(true);
|
||||
// default behaviours
|
||||
assertTrue(user.hasPermission(""));
|
||||
assertTrue(user.hasPermission(null));
|
||||
|
||||
// test if player has the permission
|
||||
when(player.hasPermission(anyString())).thenReturn(true);
|
||||
assertTrue(user.hasPermission("perm"));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user