diff options
author | 2018-09-05 22:46:23 +0300 | |
---|---|---|
committer | 2018-09-05 22:46:23 +0300 | |
commit | 3ad367ca8a9a11c026938459f7b852f6391bd341 (patch) | |
tree | 263f1309e83c5dc5cd9b7e5cc97459f936d6895d /juick-server/src/test/java/com/juick/server | |
parent | 302200828e48932dba38dc36fd41dd23fb6dfc76 (diff) |
KeystoreManager shares keystore between XMPP and ActivityPub
Diffstat (limited to 'juick-server/src/test/java/com/juick/server')
-rw-r--r-- | juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 6 |
1 files changed, 4 insertions, 2 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 3f196461..1931f13b 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 @@ -156,6 +156,8 @@ public class ServerTests { private ImagesService imagesService; @Inject private ServerManager serverManager; + @Inject + private KeystoreManager keystoreManager; @Value("${hostname:localhost}") private Jid jid; @Value("${xmppbot_jid:juick@localhost}") @@ -1342,8 +1344,8 @@ public class ServerTests { public void userProfileAndBlogShouldBeExposedAsActivityStream() throws Exception { mockMvc.perform(get("/u/ugnich").accept(ActivityObject.LD_JSON_MEDIA_TYPE)) .andExpect(status().isOk()) - .andExpect(jsonPath("$.@context", is(ActivityObject.CONTEXT_URI))) - .andExpect(jsonPath("$.icon.url", is("http://localhost:8080/i/a/1.png"))); + .andExpect(jsonPath("$.icon.url", is("http://localhost:8080/i/a/1.png"))) + .andExpect(jsonPath("$.publicKey.publicKeyPem", is(keystoreManager.getPublicKey()))); jdbcTemplate.execute("DELETE FROM messages"); List<Integer> mids = IteratorUtils.toList(IntStream.rangeClosed(1, 30) .mapToObj(i -> messagesService.createMessage(ugnich.getUid(), |