Disable CSP for development purposes
Change-Id: Iff20edb302f9f03e524b7bd8bcb4ce3a9690d3be
diff --git a/t/plugin/csp.t b/t/plugin/csp.t
index 1031450..aa6cd70 100644
--- a/t/plugin/csp.t
+++ b/t/plugin/csp.t
@@ -149,6 +149,24 @@
like($content, qr/nonce-\Q$1\E/);
+# Disable csp
+$t = Test::Mojo->new(Mojolicious::Lite->new);
+$t->app->plugin('Kalamar::Plugin::CSP' => {
+ '-disable' => 1
+});
+
+$t->app->routes->get('/' => sub {
+ shift->render(text => 'hello world');
+});
+
+$t->app->csp->add('script-src', '*');
+is($t->app->csp_nonce_tag,'');
+
+$t->get_ok('/')
+ ->status_is(200)
+ ->content_is('hello world')
+ ->header_is($csp, undef)
+ ;
done_testing;
__END__