mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-15 11:00:47 +02:00
Cleanup-conversion-translations (#5906)
Co-authored-by: Anthony Stirling <[email protected]>
This commit is contained in:
co-authored by
Anthony Stirling
parent
b68b406a2a
commit
0545c3f997
@@ -21,8 +21,7 @@ class ApiEndpointTest {
|
||||
return postNodeWithParams(description, true, names);
|
||||
}
|
||||
|
||||
private JsonNode postNodeWithParams(
|
||||
String description, boolean required, String... names) {
|
||||
private JsonNode postNodeWithParams(String description, boolean required, String... names) {
|
||||
ObjectNode post = mapper.createObjectNode();
|
||||
post.put("description", description);
|
||||
ArrayNode params = mapper.createArrayNode();
|
||||
|
||||
@@ -103,7 +103,9 @@ class LanguageServiceBasicTest {
|
||||
// Verify filtering by restrictions
|
||||
assertTrue(supportedLanguages.contains("en_US"), "Allowed language should be included");
|
||||
assertTrue(supportedLanguages.contains("fr_FR"), "Allowed language should be included");
|
||||
assertFalse(supportedLanguages.contains("en_GB"), "en_GB should NOT be included when not in whitelist");
|
||||
assertFalse(
|
||||
supportedLanguages.contains("en_GB"),
|
||||
"en_GB should NOT be included when not in whitelist");
|
||||
assertFalse(supportedLanguages.contains("de_DE"), "Restricted language should be excluded");
|
||||
}
|
||||
|
||||
|
||||
@@ -84,11 +84,13 @@ class LanguageServiceTest {
|
||||
|
||||
// Verify
|
||||
assertEquals(
|
||||
allowedLanguages,
|
||||
supportedLanguages,
|
||||
"Should return only whitelisted languages");
|
||||
assertFalse(supportedLanguages.contains("en_GB"), "en_GB should NOT be included when not in whitelist");
|
||||
assertFalse(supportedLanguages.contains("de_DE"), "de_DE should NOT be included when not in whitelist");
|
||||
allowedLanguages, supportedLanguages, "Should return only whitelisted languages");
|
||||
assertFalse(
|
||||
supportedLanguages.contains("en_GB"),
|
||||
"en_GB should NOT be included when not in whitelist");
|
||||
assertFalse(
|
||||
supportedLanguages.contains("de_DE"),
|
||||
"de_DE should NOT be included when not in whitelist");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user