diff options
author | Vitaly Takmazov | 2018-05-25 21:00:36 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-05-25 21:00:36 +0300 |
commit | 7f181f590fbc7b2062a5348a3b050d7cf884a135 (patch) | |
tree | 3e6d8156faee3283e506ffa8dbaa58be21643244 /juick-server/src | |
parent | bc32308c2802b239d9741c994ebe2b2287d5504b (diff) |
TopManager: *NSFW should not appear in Top
Diffstat (limited to 'juick-server/src')
-rw-r--r-- | juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java index 41f2b68c..8e3e5dfd 100644 --- a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java +++ b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java @@ -584,6 +584,13 @@ public class ServerTests { assertThat(juickTag.TID, is(2)); tagService.updateTags(topmid, Collections.singletonList(juickTag)); assertThat(messagesService.getPopularCandidates().isEmpty(), is(true)); + tagService.updateTags(topmid, Collections.singletonList(juickTag)); + 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)); + tagService.updateTags(topmid, Collections.singletonList(nsfw)); + assertThat(messagesService.getPopularCandidates().isEmpty(), is(true)); } @Test public void inReplyToScannerTest() { |