diff options
author | makc | 2021-07-29 12:01:52 +0200 |
---|---|---|
committer | Vitaly Takmazov | 2021-07-29 13:41:28 +0300 |
commit | e8b0adab2aecc233a090f98c569931871f977ba4 (patch) | |
tree | 9ea3d83d16fd7a7681bf21a645b0ae2d3c0af2ec /src/test/java/com/juick/server/tests/ServerTests.java | |
parent | cd86dc746b2d8c3bdc70061b4bdd287cd3b394d8 (diff) |
better hashtags
https://juick.com/rm/2997070#7
Diffstat (limited to 'src/test/java/com/juick/server/tests/ServerTests.java')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index 795415be..c37d70bc 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -437,6 +437,18 @@ public class ServerTests { } @Test + public void tagParsingTests() { + assertEquals(0, tagService.fromString("*").getRight().size()); + assertEquals(1, tagService.fromString("*kek").getRight().size()); + assertEquals(1, tagService.fromString("*123").getRight().size()); + assertEquals(0, tagService.fromString("#").getRight().size()); + assertEquals(1, tagService.fromString("#kek").getRight().size()); + assertEquals(1, tagService.fromString("#12k").getRight().size()); + assertEquals(0, tagService.fromString("#123").getRight().size()); + assertEquals(2, tagService.fromString("#mixed *tags #123 test").getRight().size()); + } + + @Test public void likeTypeStatsTests() { User dsdss = userService.createUser("dsdss", "secret").orElseThrow(IllegalStateException::new); final int freefdId = freefd.getUid(); |