File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,13 @@ module SecureHeaders
2020 end . to raise_error ( Configuration ::NotYetConfiguredError )
2121 end
2222
23+ it "raises and ArgumentError when referencing an override that has not been set" do
24+ expect do
25+ Configuration . default
26+ SecureHeaders . use_secure_headers_override ( request , :missing )
27+ end . to raise_error ( ArgumentError )
28+ end
29+
2330 describe "#header_hash_for" do
2431 it "allows you to opt out of individual headers via API" do
2532 Configuration . default
@@ -312,6 +319,14 @@ module SecureHeaders
312319 end
313320 end . to raise_error ( PublicKeyPinsConfigError )
314321 end
322+
323+ it "validates your cookies config upon configuration" do
324+ expect do
325+ Configuration . default do |config |
326+ config . cookies = { secure : "lol" }
327+ end
328+ end . to raise_error ( CookiesConfigError )
329+ end
315330 end
316331 end
317332end
You can’t perform that action at this time.
0 commit comments