This commit is contained in:
Magzhan Zhumabayev
2026-05-14 20:34:13 +05:00
parent b41ce6293e
commit 66faa089ff
2 changed files with 5 additions and 5 deletions
@@ -6,7 +6,7 @@ import java.util.stream.Collectors;
final class SocialPostTextFormatter {
static final String CONTACTS_BLOCK = "telegram - @konturaibot\nномер для звонка - 87273901485";
static final String CONTACTS_BLOCK = "telegram - https://t.me/konturaibot\nномер для звонка - tel:+77273901485";
private static final String ELLIPSIS = "...";
private static final String BLOCK_SEPARATOR = "\n\n";
@@ -15,8 +15,8 @@ class SocialPostTextFormatterTest {
assertEquals(
"Новый продукт\n\n" +
"telegram - @konturaibot\n" +
"номер для звонка - 87273901485\n\n" +
"telegram - https://t.me/konturaibot\n" +
"номер для звонка - tel:+77273901485\n\n" +
"#ai #crm",
text);
}
@@ -35,8 +35,8 @@ class SocialPostTextFormatterTest {
String text = SocialPostTextFormatter.buildPostText(longPostText, List.of("marketing"), 120);
assertTrue(text.length() <= 120);
assertTrue(text.contains("telegram - @konturaibot"));
assertTrue(text.contains("номер для звонка - 87273901485"));
assertTrue(text.contains("telegram - https://t.me/konturaibot"));
assertTrue(text.contains("номер для звонка - tel:+77273901485"));
assertTrue(text.endsWith("#marketing"));
}
}