#761 Fix removal and restoration of primary permission group
- Improve how a player is being switched between permission groups (add new group before removing old one) - Remove group handling logic from LimboCache: AuthGroupHandler is now solely responsible for changing the player's permission group
This commit is contained in:
@@ -134,13 +134,11 @@ public class CommonServiceTest {
|
||||
// given
|
||||
Player player = mock(Player.class);
|
||||
AuthGroupType type = AuthGroupType.LOGGED_IN;
|
||||
given(authGroupHandler.setGroup(player, type)).willReturn(true);
|
||||
|
||||
// when
|
||||
boolean result = commonService.setGroup(player, type);
|
||||
commonService.setGroup(player, type);
|
||||
|
||||
// then
|
||||
verify(authGroupHandler).setGroup(player, type);
|
||||
assertThat(result, equalTo(true));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user