From: David ‘Bombe’ Roden Date: Sun, 23 Apr 2017 14:11:34 +0000 (+0200) Subject: Add test for not cancelling on HTML MIME type X-Git-Tag: 0.9.7^2~242 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=515e174cfbc642648fc0295ce4a8718041582b5b;p=Sone.git Add test for not cancelling on HTML MIME type --- diff --git a/src/test/kotlin/net/pterodactylus/sone/core/DefaultElementLoaderTest.kt b/src/test/kotlin/net/pterodactylus/sone/core/DefaultElementLoaderTest.kt index 40d0054..d31900d 100644 --- a/src/test/kotlin/net/pterodactylus/sone/core/DefaultElementLoaderTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/core/DefaultElementLoaderTest.kt @@ -92,6 +92,13 @@ class DefaultElementLoaderTest { } @Test + fun `element loader does not cancel on text html mime type`() { + elementLoader.loadElement(IMAGE_ID) + verify(freenetInterface).startFetch(eq(freenetURI), callback.capture()) + assertThat(callback.value.shouldCancel(freenetURI, "text/html", sizeOkay), `is`(false)) + } + + @Test fun `image loader can load image`() { elementLoader.loadElement(decomposedKey) verify(freenetInterface).startFetch(eq(FreenetURI(decomposedKey)), callback.capture())