X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ftemplate%2FLinkedElementRenderFilterTest.kt;h=31bc4eb11506b9b2eff80207358b522a45fb9444;hp=07cba3d47f7580139c997aa0f91a059f7a1eafaf;hb=03c29a3838e23ed0b9731ca4d84cf58038c30dfe;hpb=25727046bb4fd452ed0fb8511dee73786b0b738a diff --git a/src/test/kotlin/net/pterodactylus/sone/template/LinkedElementRenderFilterTest.kt b/src/test/kotlin/net/pterodactylus/sone/template/LinkedElementRenderFilterTest.kt index 07cba3d..31bc4eb 100644 --- a/src/test/kotlin/net/pterodactylus/sone/template/LinkedElementRenderFilterTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/template/LinkedElementRenderFilterTest.kt @@ -38,7 +38,7 @@ class LinkedElementRenderFilterTest { @Test fun `filter renders empty span for not loaded elements`() { - val html = filter.format(null, LinkedElement("KSK@gpl.png", loading = true), emptyMap()) as String + val html = filter.format(null, LinkedElement("KSK@gpl.png", loading = true), emptyMap()) as String val spanNode = Jsoup.parseBodyFragment(html).body().child(0) assertThat(spanNode.nodeName(), `is`("span")) assertThat(spanNode.attr("class"), `is`("linked-element not-loaded")) @@ -49,7 +49,7 @@ class LinkedElementRenderFilterTest { @Test fun `filter can render linked images`() { - val html = filter.format(null, LinkedElement("KSK@gpl.png", properties = mapOf("type" to "image")), emptyMap()) as String + val html = filter.format(null, LinkedElement("KSK@gpl.png", properties = mapOf("type" to "image")), emptyMap()) as String val outerSpanNode = Jsoup.parseBodyFragment(html).body().child(0) assertThat(outerSpanNode.nodeName(), `is`("span")) assertThat(outerSpanNode.attr("class"), `is`("linked-element loaded")) @@ -63,7 +63,7 @@ class LinkedElementRenderFilterTest { @Test fun `filter can render HTML pages`() { - val html = filter.format(null, LinkedElement("KSK@gpl.html", properties = mapOf("type" to "html", "title" to "Page Title", "description" to "This is the description.")), emptyMap()) as String + val html = filter.format(null, LinkedElement("KSK@gpl.html", properties = mapOf("type" to "html", "title" to "Page Title", "description" to "This is the description.")), emptyMap()) as String val outerSpanNode = Jsoup.parseBodyFragment(html).body().child(0) assertThat(outerSpanNode.nodeName(), equalTo("span")) assertThat(outerSpanNode.attr("class"), `is`("linked-element loaded"))