diff options
author | Vitaly Takmazov | 2018-10-23 17:48:25 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-10-23 17:48:25 +0300 |
commit | 8e83a22012c2bee323eeeb3ae1384ac488741ebf (patch) | |
tree | 947f307ce94e926938b23427e60346e0c5d21c11 /juick-server/src/test/java/com/juick/server/tests | |
parent | cab7e26aea1ac9518ff6c625340de2b809eaed50 (diff) |
Last seen
Diffstat (limited to 'juick-server/src/test/java/com/juick/server/tests')
-rw-r--r-- | juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java index a6750644..58596850 100644 --- a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java +++ b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java @@ -33,7 +33,6 @@ import com.juick.model.PrivateChats; import com.juick.model.TagStats; import com.juick.server.*; import com.juick.server.api.activity.model.Context; -import com.juick.server.api.activity.model.Key; import com.juick.server.api.activity.model.Note; import com.juick.server.api.activity.model.Person; import com.juick.server.api.activity.model.activities.Create; @@ -159,8 +158,6 @@ public class ServerTests { @Inject private ObjectMapper jsonMapper; @Inject - private WebApplicationContext wac; - @Inject private XMPPServer server; @Inject private CommandsManager commandsManager; @@ -1745,4 +1742,12 @@ public class ServerTests { PrivateChats chats = jsonMapper.readValue(result.getResponse().getContentAsString(), PrivateChats.class); assertThat(chats.getUsers().size(), is(1)); } + @Test + public void seenTests() { + Instant now = Instant.now(); + int newUserUid = userService.createUser("newuser", "assword"); + assertThat(userService.getUserByUID(newUserUid).get().getSeen(), is(nullValue())); + messagesService.createMessage(newUserUid, "YO", "", null); + assertThat(userService.getUserByUID(newUserUid).get().getSeen(), greaterThan(now)); + } } |