Sha256: 8bccc295d07f3e1ca1e7338cb40d244347a72ab27a406ee6e24342ae1b9734d1

Contents?: true

Size: 745 Bytes

Versions: 10

Compression:

Stored size: 745 Bytes

Contents

require 'minitest/autorun'
require File.dirname(__FILE__) + '/../lib/yawast'
require File.dirname(__FILE__) + '/base'

class TestScannerCms < Minitest::Test
  include TestBase

  def test_generator_tag_valid
    body = File.read(File.dirname(__FILE__) + '/data/cms_wordpress_body.txt')
    override_stdout
    Yawast::Scanner::Cms.get_generator body

    assert stdout_value.include?('WordPress'), "Unexpected generator tag: #{stdout_value}"

    restore_stdout
  end

  def test_generator_tag_invalid
    body = File.read(File.dirname(__FILE__) + '/data/cms_none_body.txt')
    override_stdout
    Yawast::Scanner::Cms.get_generator body

    assert stdout_value == '', "Unexpected generator tag: #{stdout_value}"

    restore_stdout
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
yawast-0.4.0.beta4 test/test_scan_cms.rb
yawast-0.4.0.beta3 test/test_scan_cms.rb
yawast-0.4.0.beta2 test/test_scan_cms.rb
yawast-0.4.0.beta1 test/test_scan_cms.rb
yawast-0.3.0 test/test_scan_cms.rb
yawast-0.3.0.beta2 test/test_scan_cms.rb
yawast-0.3.0.beta1 test/test_scan_cms.rb
yawast-0.2.2 test/test_scan_cms.rb
yawast-0.2.1 test/test_scan_cms.rb
yawast-0.2.0.beta3 test/test_scan_cms.rb