diff options
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java index f08c49f5..d4f79f3e 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -1372,14 +1372,16 @@ public class ServerTests { jdbcTemplate.update("INSERT INTO favorites(user_id, user_uri, message_id, like_id, ts) " + "values (0, 'http://example.com/u/test', ?, 1, now())", mid); assertThat(messagesService.getMessage(mid).get().getLikes(), is(4)); - assertThat(CollectionUtils.isEqualCollection(messagesService.getMessageRecommendations(mid) - .stream().map(User::getName).collect(Collectors.toList()), + assertThat(CollectionUtils.isEqualCollection(messagesService.getMessagesRecommendations( + Collections.singletonList(mid)) + .stream().map(p -> p.getRight()).map(User::getName).collect(Collectors.toList()), Arrays.asList("fmap", "ermine", "pogo", "Anonymous")), is(true)); privacyQueriesService.blacklistUser(userService.getUserByName("monstreek"), userService.getUserByName("pogo")); assertThat(messagesService.getMessage(mid).get().getLikes(), is(4)); - assertThat(CollectionUtils.isEqualCollection(messagesService.getMessageRecommendations(mid) - .stream().map(User::getName).collect(Collectors.toList()), + assertThat(CollectionUtils.isEqualCollection(messagesService.getMessagesRecommendations( + Collections.singletonList(mid)) + .stream().map(p -> p.getRight()).map(User::getName).collect(Collectors.toList()), Arrays.asList("fmap", "ermine", "Anonymous")), is(true)); } @Test |