#293 Fix localized command losing its children
This commit is contained in:
@@ -92,6 +92,20 @@ public class HelpMessagesServiceTest {
|
||||
assertThat(localCommand, sameInstance(command));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldKeepChildrenInLocalCommand() {
|
||||
// given
|
||||
CommandDescription command = TestCommandsUtil.getCommandWithLabel(COMMANDS, "authme");
|
||||
|
||||
// when
|
||||
CommandDescription localCommand = helpMessagesService.buildLocalizedDescription(command);
|
||||
|
||||
// then
|
||||
assertThat(localCommand.getChildren(), equalTo(command.getChildren()));
|
||||
assertThat(localCommand.getDescription(), equalTo("authme cmd"));
|
||||
assertThat(localCommand.getDetailedDescription(), equalTo("Main command"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldGetTranslationsForSectionAndMessage() {
|
||||
// given / when / then
|
||||
|
||||
@@ -7,6 +7,8 @@ section:
|
||||
arguments: 'arg.'
|
||||
|
||||
commands:
|
||||
authme:
|
||||
detailedDescription: 'Main command'
|
||||
authme.register:
|
||||
description: 'Registration'
|
||||
detailedDescription: 'Registers the player'
|
||||
|
||||
Reference in New Issue
Block a user