Introduce CSP headers to Kalamar (start of #72)
Change-Id: I84b7ff0accab3d783ad653fae123c25fee1d92b9
diff --git a/t/plugin/auth.t b/t/plugin/auth.t
index 63433b2..f5351de 100644
--- a/t/plugin/auth.t
+++ b/t/plugin/auth.t
@@ -29,6 +29,8 @@
# Configure fake backend
$fake_backend->pattern->defaults->{app}->log($t->app->log);
+my $q = qr!(?:\"|")!;
+
$t->get_ok('/realapi/v1.0')
->status_is(200)
->content_is('Fake server available');
@@ -37,7 +39,7 @@
->status_is(200)
->text_like('h1 span', qr/KorAP: Find .Baum./i)
->text_like('#total-results', qr/\d+$/)
- ->content_like(qr/\"authorized\"\:null/)
+ ->content_like(qr/${q}authorized${q}:null/)
->element_exists_not('div.button.top a')
->element_exists_not('aside.active')
->element_exists_not('aside.off')
@@ -135,7 +137,7 @@
->text_like('h1 span', qr/KorAP: Find .Baum./i)
->text_like('#total-results', qr/\d+$/)
->element_exists_not('div.notify-error')
- ->content_like(qr/\"authorized\"\:\"test\"/)
+ ->content_like(qr/${q}authorized${q}:${q}test${q}/)
->element_exists('div.button.top a')
->element_exists('div.button.top a.logout[title~="test"]')
;
@@ -156,7 +158,7 @@
->status_is(200)
->text_like('h1 span', qr/KorAP: Find .Baum./i)
->text_like('#total-results', qr/\d+$/)
- ->content_like(qr/\"authorized\"\:null/)
+ ->content_like(qr/${q}authorized${q}:null/)
;
# Get redirect