summaryrefslogtreecommitdiff
path: root/spec/support/matchers/security_header_matcher.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/matchers/security_header_matcher.rb')
-rw-r--r--spec/support/matchers/security_header_matcher.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/matchers/security_header_matcher.rb b/spec/support/matchers/security_header_matcher.rb
new file mode 100644
index 00000000000..f8518d13ebb
--- /dev/null
+++ b/spec/support/matchers/security_header_matcher.rb
@@ -0,0 +1,5 @@
+RSpec::Matchers.define :include_security_headers do |expected|
+ match do |actual|
+ expect(actual.headers).to include('X-Content-Type-Options')
+ end
+end