Added tests for Mojo >= 9.11 compat
Change-Id: Iecbfd770c0b727a78bd443342ee36dd4b2c64e1d
diff --git a/Changes b/Changes
index 2b2bfa5..955ff8f 100755
--- a/Changes
+++ b/Changes
@@ -1,9 +1,10 @@
-0.42 2021-03-15
+0.42 2021-03-22
- Added GitHub based CI for perl.
- Added further methods for communicating JSON Files
with the server to the APIs (lerepp).
- Remove ruby-sass requirement (fixes #123).
- Added support to issue new OAuth2 tokens.
+ - Added tests for Mojolicious >= 9.11 compatibility.
0.41 2021-03-01
- Introduce CORS headers to the proxy.
diff --git a/t/match_info.t b/t/match_info.t
index 235ae66..4e20fb5 100644
--- a/t/match_info.t
+++ b/t/match_info.t
@@ -27,6 +27,7 @@
# Query passed
$t->get_ok('/corpus/WPD15/232/39681/p2133-2134?spans=false&foundry=*&format=json')
->status_is(200)
+ ->content_type_is('application/json;charset=UTF-8')
->json_is('/textSigle', 'WPD15/232/39681')
->json_like('/snippet', qr!<span class=\"context-left\">!)
->header_isnt('X-Kalamar-Cache', 'true')
@@ -101,6 +102,14 @@
;
$t->get_ok('/corpus/WPD15/232/39681/p2133-2134?spans=no&format=html')
+ ->content_type_is('text/html;charset=UTF-8')
+ ->status_is(400)
+ ->text_is('p.no-results', 'Unable to perform the action.')
+ ->text_is('div.notify', 'Parameter "spans" invalid')
+ ;
+
+$t->get_ok('/corpus/WPD15/232/39681/p2133-2134?spans=no')
+ ->content_type_is('text/html;charset=UTF-8')
->status_is(400)
->text_is('p.no-results', 'Unable to perform the action.')
->text_is('div.notify', 'Parameter "spans" invalid')
diff --git a/t/query.t b/t/query.t
index 227dbf1..d3f0cd3 100644
--- a/t/query.t
+++ b/t/query.t
@@ -31,6 +31,7 @@
$t->get_ok('/?q=baum')
->status_is(200)
->text_is('#error','')
+ ->content_type_is('text/html;charset=UTF-8')
->text_is('title', 'KorAP: Find »baum« with Poliqarp')
->element_exists('meta[name="DC.title"][content="KorAP: Find »baum« with Poliqarp"]')