.
This commit is contained in:
@@ -6,7 +6,7 @@ import java.util.stream.Collectors;
|
|||||||
|
|
||||||
final class SocialPostTextFormatter {
|
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 ELLIPSIS = "...";
|
||||||
private static final String BLOCK_SEPARATOR = "\n\n";
|
private static final String BLOCK_SEPARATOR = "\n\n";
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ class SocialPostTextFormatterTest {
|
|||||||
|
|
||||||
assertEquals(
|
assertEquals(
|
||||||
"Новый продукт\n\n" +
|
"Новый продукт\n\n" +
|
||||||
"telegram - @konturaibot\n" +
|
"telegram - https://t.me/konturaibot\n" +
|
||||||
"номер для звонка - 87273901485\n\n" +
|
"номер для звонка - tel:+77273901485\n\n" +
|
||||||
"#ai #crm",
|
"#ai #crm",
|
||||||
text);
|
text);
|
||||||
}
|
}
|
||||||
@@ -35,8 +35,8 @@ class SocialPostTextFormatterTest {
|
|||||||
String text = SocialPostTextFormatter.buildPostText(longPostText, List.of("marketing"), 120);
|
String text = SocialPostTextFormatter.buildPostText(longPostText, List.of("marketing"), 120);
|
||||||
|
|
||||||
assertTrue(text.length() <= 120);
|
assertTrue(text.length() <= 120);
|
||||||
assertTrue(text.contains("telegram - @konturaibot"));
|
assertTrue(text.contains("telegram - https://t.me/konturaibot"));
|
||||||
assertTrue(text.contains("номер для звонка - 87273901485"));
|
assertTrue(text.contains("номер для звонка - tel:+77273901485"));
|
||||||
assertTrue(text.endsWith("#marketing"));
|
assertTrue(text.endsWith("#marketing"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user