Fix tests

This commit is contained in:
tastybento 2023-09-04 20:00:13 -07:00
parent 86293131eb
commit b788d4c49f
1 changed files with 2 additions and 1 deletions

View File

@ -103,6 +103,7 @@ public class IslandTeamCommandTest {
when(plugin.getIslands()).thenReturn(im);
// is owner of island
when(im.getOwner(any(), any())).thenReturn(uuid);
when(im.getPrimaryIsland(world, uuid)).thenReturn(island);
// Max members
when(im.getMaxMembers(eq(island), eq(RanksManager.MEMBER_RANK))).thenReturn(3);
// No team members
@ -160,7 +161,7 @@ public class IslandTeamCommandTest {
*/
@Test
public void testExecuteUserStringListOfStringNoIsland() {
when(im.getOwner(any(), any())).thenReturn(null);
when(im.getPrimaryIsland(world, uuid)).thenReturn(null);
assertFalse(tc.execute(user, "team", Collections.emptyList()));
verify(user).sendMessage(eq("general.errors.no-island"));
}