diff options
Diffstat (limited to 'src/test/java/com/juick/server')
-rw-r--r-- | src/test/java/com/juick/server/tests/ServerTests.java | 5 |
1 files changed, 3 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 bb70e875..b7b78fa9 100644 --- a/src/test/java/com/juick/server/tests/ServerTests.java +++ b/src/test/java/com/juick/server/tests/ServerTests.java @@ -389,7 +389,7 @@ public class ServerTests { assertEquals("yo", msg.getText()); User me = msg.getUser(); assertEquals("mmmme", me.getName()); - assertEquals("mmmme", messagesService.getMessageAuthor(mid).getName()); + assertEquals("mmmme", msg.getUser().getName()); int tagID = tagService.createTag("weather"); Tag tag = tagService.getTag(tagID); Set<Tag> tagList = Set.of(tag); @@ -1439,7 +1439,8 @@ public class ServerTests { jdbcTemplate.update("UPDATE messages_txt SET updated_at='1990-05-05 00:00:00' WHERE message_id=?", original.getMid()); assertThat(messagesService.deleteMessage(ugnich.getUid(), original.getMid()), is(true)); - assertThat(messagesService.getMessageAuthor(original.getMid()), is(archiveUser)); + + assertThat(messagesService.getMessage(original.getMid()).orElseThrow().getUser(), is(archiveUser)); jdbcTemplate.update("UPDATE messages_txt SET updated_at=? WHERE message_id=?", Timestamp.from(Instant.now()), original.getMid()); |