aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/juick/server')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java7
1 files changed, 7 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 267ab9f8..14517a60 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -805,6 +805,13 @@ public class ServerTests {
assertThat(messagesService.getPopularCandidates().isEmpty(), is(true));
tagService.updateTags(topmid, Collections.singletonList(juickTag));
assertThat(messagesService.getPopularCandidates().isEmpty(), is(false));
+ CommandResult resultRecommend = commandsManager.commandRecommend(serviceUser, URI.create(""), String.valueOf(topmid));
+ List<Integer> msgs = messagesService.getUserRecommendations(serviceUser.getUid(), 0);
+ assertThat(msgs.get(0), is(topmid));
+ List<Integer> allMsgs = messagesService.getUserBlogWithRecommendations(serviceUser, ugnich, 0, 0);
+ assertThat(allMsgs.contains(topmid), is(true));
+ CommandResult resultUndo = commandsManager.commandRecommend(serviceUser, URI.create(""), String.valueOf(topmid));
+ assertThat(messagesService.getPopularCandidates().isEmpty(), is(false));
jdbcTemplate.update("INSERT INTO tags(tag_id, name) VALUES(805, 'NSFW')");
Tag nsfw = tagService.getTag("NSFW", false);
assertThat(nsfw.TID, equalTo(805));