From: David ‘Bombe’ Roden Date: Fri, 1 Nov 2019 17:59:17 +0000 (+0100) Subject: ✅ Add tests for WOTC.addContext X-Git-Tag: v81^2~87 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=6d9add74f45486ca976c63180cf1c8296a67e66e ✅ Add tests for WOTC.addContext --- diff --git a/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt b/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt index 84f1f98..35a5ffb 100644 --- a/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt @@ -155,6 +155,18 @@ class WebOfTrustConnectorTest { )) } + @Test + fun `adding a context sends the correct own identity id`() { + createPluginConnector("AddContext", hasField("Identity", equalTo(ownIdentity.id))) + .connect { addContext(ownIdentity, "TestContext") } + } + + @Test + fun `adding a context sends the correct context`() { + createPluginConnector("AddContext", hasField("Context", equalTo("TestContext"))) + .connect { addContext(ownIdentity, "TestContext") } + } + } private fun PluginConnector.connect(block: WebOfTrustConnector.() -> R) =