mirror of
https://github.com/google/nomulus
synced 2026-09-06 16:17:13 +00:00
Require token transition schedules for default tokens (#2005)
This commit is contained in:
@@ -440,6 +440,16 @@ class GenerateAllocationTokensCommandTest extends CommandTestCase<GenerateAlloca
|
||||
.isEqualTo("For UNLIMITED_USE tokens, must specify --token_status_transitions");
|
||||
}
|
||||
|
||||
@Test
|
||||
void testFailure_defaultPromoMustHaveTransitions() {
|
||||
assertThat(
|
||||
assertThrows(
|
||||
IllegalArgumentException.class,
|
||||
() -> runCommand("--number", "999", "--type", "DEFAULT_PROMO")))
|
||||
.hasMessageThat()
|
||||
.isEqualTo("For DEFAULT_PROMO tokens, must specify --token_status_transitions");
|
||||
}
|
||||
|
||||
private AllocationToken createToken(
|
||||
String token,
|
||||
@Nullable HistoryEntryId redemptionHistoryEntryId,
|
||||
|
||||
Reference in New Issue
Block a user