aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick/server/tests/ServerTests.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/juick/server/tests/ServerTests.java')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index d5db7269..0971f6b1 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -1563,7 +1563,7 @@ public class ServerTests {
}
@Test
- public void bannedUserShouldBeShadowedFromRecommendationsList() {
+ public void bannedUserShouldNotBeInRecommendationsList() {
jdbcTemplate.execute("DELETE FROM bl_users");
User ermine = userService.createUser("ermine", "secret").orElseThrow(IllegalStateException::new);
User monstreek = userService.createUser("monstreek", "secret").orElseThrow(IllegalStateException::new);
@@ -1581,11 +1581,12 @@ public class ServerTests {
.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().getRecommendations().size(), is(4));
+ assertThat(messagesService.getMessage(mid).get().getRecommendations().size(), is(3));
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));
+ jdbcTemplate.execute("DELETE FROM favorites");
}
@Test
@@ -1661,6 +1662,8 @@ public class ServerTests {
return display == null || !display.getValue().equals("none");
}).count();
assertThat(visibleItems, equalTo(14L));
+ jdbcTemplate.execute("DELETE FROM messages");
+ jdbcTemplate.execute("DELETE FROM replies");
}
@Test