✅ Add tests for WOTC.removeContext
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 1 Nov 2019 18:01:57 +0000 (19:01 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 1 Nov 2019 18:01:57 +0000 (19:01 +0100)
src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt

index 35a5ffb..18e9ae9 100644 (file)
@@ -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 <R> PluginConnector.connect(block: WebOfTrustConnector.() -> R) =