Generalize documentation helpers
Change-Id: Iaba69a433f25d2160857694b0b434c51c02c0367
diff --git a/t/doc.t b/t/doc.t
index 3f4d0c1..ca58755 100644
--- a/t/doc.t
+++ b/t/doc.t
@@ -61,10 +61,10 @@
# Check data
$t->get_ok('/doc/data/annotation' => { 'Accept-Language' => 'en-US, en, de-DE' })
->status_is(200)
- ->text_is('#tutorial-top', 'Annotations');
+ ->text_is('#page-top', 'KorAP: Annotations');
$t->get_ok('/doc/data/annotation' => { 'Accept-Language' => 'de-DE, en-US, en' })
->status_is(200)
- ->text_is('#tutorial-top', 'Annotationen');
+ ->text_is('#page-top', 'KorAP: Annotationen');
my $app = $t->app;
diff --git a/t/docembed.t b/t/docembed.t
index 8224fa7..2bdc69a 100644
--- a/t/docembed.t
+++ b/t/docembed.t
@@ -19,7 +19,7 @@
$t->get_ok('/doc')
->text_is('nav > ul.nav > li.active a', 'KorAP')
->text_is('nav > ul.nav > li:last-child a', 'Privacy')
- ->element_exists('nav > ul.nav > li:last-child a[href=/doc/privacy#tutorial-top]')
+ ->element_exists('nav > ul.nav > li:last-child a[href=/doc/privacy#page-top]')
;
done_testing;
diff --git a/t/docnavi.t b/t/docnavi.t
index dc1e18a..5b8447f 100644
--- a/t/docnavi.t
+++ b/t/docnavi.t
@@ -261,10 +261,6 @@
like($render, qr!<a href="/doc/faq(?:#[^"]+)?">Häufige Fragen</a>!,
'Path matches FAQ');
-
-is($app->doc_link_to('privacy', 'privacy'), '<a class="doc-link" href="/doc/privacy">privacy</a>');
-is($app->doc_link_to('privacy', 'korap', 'privacy'), '<a class="doc-link" href="/doc/korap/privacy">privacy</a>');
-
done_testing;
__END__
diff --git a/t/page.t b/t/page.t
new file mode 100644
index 0000000..61c02d6
--- /dev/null
+++ b/t/page.t
@@ -0,0 +1,23 @@
+use Mojo::Base -strict;
+use Test::More;
+use Test::Mojo;
+
+# Test the documentation
+
+my $t = Test::Mojo->new('Kalamar');
+
+my $app = $t->app;
+
+is($app->under_construction, '<p>Under Construction!</p>');
+
+is($app->embedded_link_to('privacy', 'privacy'), '<a class="embedded-link" href="/doc/privacy">privacy</a>');
+is($app->embedded_link_to('privacy', 'korap', 'privacy'), '<a class="embedded-link" href="/doc/korap/privacy">privacy</a>');
+
+
+my $c = $app->build_controller;
+$c->title('Example');
+is($c->page_title, '<h2 id="page-top">Example</h2>');
+
+done_testing;
+
+1;