Add maintenance announcement tag helper
Change-Id: Ie4a18bf28e38613f9f2faded9c84be023f517b34
diff --git a/t/page.t b/t/page.t
index 8b0afd0..5fb2129 100644
--- a/t/page.t
+++ b/t/page.t
@@ -88,6 +88,22 @@
->text_is('div.logoaddon', 'Test')
;
+like($app->korap_maintenance('2023-10-03','13:00','15:00'), qr!<time datetime="2023-10-03">!);
+like($app->korap_maintenance('2023-10-03','13:00','15:00'), qr!Tuesday, 3rd October 2023!);
+like($app->korap_maintenance('2023-10-03','13:00','15:00'), qr!Maintenance 13:00 - 15:00 o'clock!);
+like($app->korap_maintenance('2023-10-03','13:00','15:00'), qr!Due to maintenance work the service will be interrupted\.!);
+
+
+$c = $app->build_controller;
+$c->req->headers->accept_language('de-DE, en-US, en');
+$c->app($app);
+
+like($c->korap_maintenance('2023-10-03','13:00','15:00'), qr!<time datetime="2023-10-03">!);
+like($c->korap_maintenance('2023-10-03','13:00','15:00'), qr!Dienstag, 3\. Oktober 2023!);
+like($c->korap_maintenance('2023-10-03','13:00','15:00'), qr!Wartungsfenster 13:00 - 15:00 Uhr!);
+like($c->korap_maintenance('2023-10-03','13:00','15:00'), qr!Aufgrund von Wartungsarbeiten wird es zu Unterbrechungen des Dienstes kommen\.!);
+
+
done_testing;
1;