Skip to content

Commit 00ce0c1

Browse files
committed
add test statements showing env is void of a config
1 parent fb07247 commit 00ce0c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spec/lib/secure_headers_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ module SecureHeaders
113113
}
114114
end
115115

116+
# before an override occurs, the env is empty
117+
expect(request.env[SECURE_HEADERS_CONFIG]).to be_nil
118+
116119
SecureHeaders.append_content_security_policy_directives(request, script_src: %w(anothercdn.com))
117120
new_config = SecureHeaders.config_for(request)
118121
expect(new_config).to_not be(Configuration.get)

0 commit comments

Comments
 (0)