From 3e97236a5d4984e0c8b86d9c8d4570afac640847 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 1 Nov 2019 20:04:25 +0100 Subject: [PATCH] =?utf8?q?=E2=9C=85=20Add=20tests=20for=20WOTC.removeTrust?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../sone/freenet/wot/WebOfTrustConnectorTest.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 384768b..e795328 100644 --- a/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/freenet/wot/WebOfTrustConnectorTest.kt @@ -286,6 +286,18 @@ class WebOfTrustConnectorTest { .connect { setTrust(ownIdentity, identity, 123, "Test Trust") } } + @Test + fun `removing trust sends correct own identity id`() { + createPluginConnector("RemoveTrust", hasField("Truster", equalTo(ownIdentity.id))) + .connect { removeTrust(ownIdentity, identity) } + } + + @Test + fun `removing trust sends correct identity id`() { + createPluginConnector("RemoveTrust", hasField("Trustee", equalTo(identity.id))) + .connect { removeTrust(ownIdentity, identity) } + } + } private fun PluginConnector.connect(block: WebOfTrustConnector.() -> R) = -- 2.7.4