Advertisement
kazoda

inspec_tomcat_web_xml.rb

Oct 2nd, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.46 KB | None | 0 0
  1. describe xml('/opt/tomcat/conf/web02.xml') do
  2.   its('web-app/mime-mapping/extension') { should include 'svg' }
  3.   its('web-app/mime-mapping/extension') { should include 'svgz' }
  4. end
  5.  
  6. describe file('/opt/tomcat/conf/web02.xml') do
  7.   its('content') { should match(%r{^\s+<extension>svg</extension>[\s]*?<mime-type>image/svg\+xml</mime-type>}) }
  8.   its('content') { should match(%r{^\s+<extension>svgz</extension>[\s]*?<mime-type>image/svg\+xml</mime-type>}) }
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement