diff --git a/t/csp.t b/t/csp.t index 6dab97f..1f00c3f 100644 --- a/t/csp.t +++ b/t/csp.t @@ -10,5 +10,10 @@ my $nonce1 = $csp1->nonce_for('script-src'); is $csp1->header_value, "script-src 'nonce-$nonce1'", 'nonce added to header properly'; +my $digest = $csp1->sha_for('script-src' => 'some content'); + +is $csp1->header_value, "script-src 'nonce-$nonce1' 'sha256-$digest'", + 'digest added to header properly'; + done_testing;