From: David ‘Bombe’ Roden Date: Fri, 1 Nov 2019 18:01:57 +0000 (+0100) Subject: ✅ Add tests for WOTC.removeContext X-Git-Tag: v81^2~86 X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=commitdiff_plain;h=efb51964999f24c2566946aa5c789e9dd3ff5ade ✅ Add tests for WOTC.removeContext --- 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 35a5ffb..18e9ae9 100644 --- a/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt @@ -167,6 +167,18 @@ class WebOfTrustConnectorTest { .connect { addContext(ownIdentity, "TestContext") } } + @Test + fun `removing a context sends the correct own identity id`() { + createPluginConnector("RemoveContext", hasField("Identity", equalTo(ownIdentity.id))) + .connect { removeContext(ownIdentity, "TestContext") } + } + + @Test + fun `removing a context sends the correct context`() { + createPluginConnector("RemoveContext", hasField("Context", equalTo("TestContext"))) + .connect { removeContext(ownIdentity, "TestContext") } + } + } private fun PluginConnector.connect(block: WebOfTrustConnector.() -> R) =