aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-06-25 01:46:18 +0300
committerGravatar Vitaly Takmazov2022-06-25 01:46:18 +0300
commit0e99af4f3a5e7c3941750de4709f69337f9f7d0f (patch)
tree9c97bf1eddf357aaaea9dfebe93dc1052360f911 /src/test/java/com/juick
parent8f3d85a8afa851f4457163d3aade01c1f63075a0 (diff)
Fix tests
Diffstat (limited to 'src/test/java/com/juick')
-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