From 3ad367ca8a9a11c026938459f7b852f6391bd341 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 5 Sep 2018 22:46:23 +0300 Subject: KeystoreManager shares keystore between XMPP and ActivityPub --- juick-server/src/test/java/com/juick/server/tests/ServerTests.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'juick-server/src/test') 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 mids = IteratorUtils.toList(IntStream.rangeClosed(1, 30) .mapToObj(i -> messagesService.createMessage(ugnich.getUid(), -- cgit v1.2.3