From b02d6b11957b32afe2ef569c095add695a7ecf28 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 1 Mar 2019 15:56:43 +0300 Subject: Fix anonymous user check --- src/test/java/com/juick/server/tests/ServerTests.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/test') diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index a0d10988..3eb349e1 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -2002,4 +2002,9 @@ public class ServerTests { assertThat(xnodeinfo.get("server"), notNullValue()); assertThat(xnodeinfo.get("software"), nullValue()); } + @Test + public void anonymousUserFromZero() { + User user = userService.getUserByUID(0).orElse(AnonymousUser.INSTANCE); + assertThat(user.isAnonymous(), is(true)); + } } -- cgit v1.2.3