From 9b04009a35cf6e9cc4874aaa95ff2ca9708019ed Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 1 Feb 2023 22:18:31 +0300 Subject: Fix emoji collation issue on MariaDB --- src/test/java/com/juick/server/tests/ServerTests.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/test/java/com/juick') diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 4cbc30b5..3c37e846 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -2640,4 +2640,12 @@ public class ServerTests { msg = messagesService.getMessage(freefd.getUid(), mid).orElseThrow(); assertThat(msg.isSubscribed(), is(false)); } + @Test + @Transactional + public void emojisShouldCollateCorrectly() { + var first = "\uD83E\uDD84"; + var second = "\uD83E\uDD5C"; + assertThat(tagService.getTag(first, true).getName(), is(first)); + assertThat(tagService.getTag(second, true).getName(), is(second)); + } } -- cgit v1.2.3