aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/test/kotlin/renderers/html/FooterMessageTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base/src/test/kotlin/renderers/html/FooterMessageTest.kt')
-rw-r--r--plugins/base/src/test/kotlin/renderers/html/FooterMessageTest.kt27
1 files changed, 27 insertions, 0 deletions
diff --git a/plugins/base/src/test/kotlin/renderers/html/FooterMessageTest.kt b/plugins/base/src/test/kotlin/renderers/html/FooterMessageTest.kt
new file mode 100644
index 00000000..d91c402e
--- /dev/null
+++ b/plugins/base/src/test/kotlin/renderers/html/FooterMessageTest.kt
@@ -0,0 +1,27 @@
+package renderers.html
+
+import org.jetbrains.dokka.base.DokkaBaseConfiguration.Companion.defaultFooterMessage
+import org.jetbrains.dokka.base.renderers.html.HtmlRenderer
+import org.jsoup.Jsoup
+import org.jsoup.nodes.Element
+import org.junit.jupiter.api.Test
+import renderers.testPage
+import utils.A
+import utils.Span
+import utils.match
+
+class FooterMessageTest : HtmlRenderingOnlyTestBase() {
+ @Test
+ fun `should include defaultFooter`() {
+ val page = testPage { }
+ HtmlRenderer(context).render(page)
+ renderedContent.match(
+ Span(A()),
+ Span(defaultFooterMessage),
+ Span(Span("Generated by "), A(Span("dokka"), Span()))
+ )
+ }
+
+ override val renderedContent: Element
+ get() = files.contents.getValue("test-page.html").let { Jsoup.parse(it) }.select(".footer").single()
+} \ No newline at end of file