mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-22 03:48:04 +01:00
Switch to a disallowed prefix model instead of a disallowed country code model
This commit is contained in:
committed by
Jon Chambers
parent
7033a0f68f
commit
2015ba77ca
@@ -272,20 +272,20 @@ class DynamicConfigurationTest {
|
||||
final DynamicConfiguration emptyConfig =
|
||||
DynamicConfigurationManager.parseConfiguration(emptyConfigYaml, DynamicConfiguration.class).orElseThrow();
|
||||
|
||||
assertTrue(emptyConfig.getPaymentsConfiguration().getDisallowedCountryCodes().isEmpty());
|
||||
assertTrue(emptyConfig.getPaymentsConfiguration().getDisallowedPrefixes().isEmpty());
|
||||
}
|
||||
|
||||
{
|
||||
final String paymentsConfigYaml =
|
||||
"payments:\n"
|
||||
+ " disallowedCountryCodes:\n"
|
||||
+ " - 44";
|
||||
+ " disallowedPrefixes:\n"
|
||||
+ " - +44";
|
||||
|
||||
final DynamicPaymentsConfiguration config =
|
||||
DynamicConfigurationManager.parseConfiguration(paymentsConfigYaml, DynamicConfiguration.class).orElseThrow()
|
||||
.getPaymentsConfiguration();
|
||||
|
||||
assertEquals(Set.of("44"), config.getDisallowedCountryCodes());
|
||||
assertEquals(List.of("+44"), config.getDisallowedPrefixes());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user