aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index d61725e6..3bfbf6d4 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2019, Juick
+ * Copyright (C) 2008-2024, Juick
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@@ -38,7 +38,10 @@ import com.juick.service.*;
import com.juick.service.activities.UpdateEvent;
import com.juick.service.component.SystemEvent;
import com.juick.test.util.MockUtils;
-import com.juick.util.*;
+import com.juick.util.DateFormattersHolder;
+import com.juick.util.HttpUtils;
+import com.juick.util.MessageUtils;
+import com.juick.util.WebUtils;
import com.juick.util.formatters.PlainTextFormatter;
import com.juick.www.WebApp;
import com.juick.www.ad.models.Site;
@@ -119,9 +122,6 @@ import java.io.*;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.nio.file.*;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.spec.InvalidKeySpecException;
import java.time.Instant;
import java.time.ZoneOffset;
import java.time.temporal.ChronoUnit;
@@ -2696,8 +2696,8 @@ public class ServerTests {
@Test
public void textTruncationShouldNotBreakEmojis() {
var text = "Так ты же написал, чтоб я сам поправил отступ \uD83D\uDE00\n";
- var expected = "Так ты же написал, чтоб я сам поправил отступ";
- var truncated = PlainTextFormatter.truncateText(text, 47);
+ var expected = "Так ты же написал, чтоб я сам поправил отступ …";
+ var truncated = StringUtils.abbreviate(text, "…", 47);
assertThat(truncated, is(expected));
}
}