aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-04-04 20:34:45 +0300
committerGravatar Vitaly Takmazov2019-04-04 20:34:45 +0300
commit0ea0026b4ac5a26b2312e329476a632548ad5fee (patch)
tree450e56545d02912ad4adce3eaa71c7a0aff8617e /src/test/java/com/juick
parent55e6924b822417940f7aae2075acae3492684bbb (diff)
Recommendations in feeds
Diffstat (limited to 'src/test/java/com/juick')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java10
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