Sha256: 50a0715f4bf47da0f49960d53079dfc1d5d464e9a938ece195c6844d527e96e1

Contents?: true

Size: 885 Bytes

Versions: 9

Compression:

Stored size: 885 Bytes

Contents

require 'spec_helper'

describe name_from_filename do
    include_examples 'plugin'

    before ( :all ) do
        options.url = url
        framework.opts.audit :links
        framework.modules.load :xss
    end

    def results
        <<YAML
---
:map:
- :safe: __URL__
- :safe: __URL__safe
- :unsafe: __URL__vuln
:total: 4
:safe: 3
:unsafe: 1
:issue_percentage: 25
YAML
    end

    it 'logs safe and vuln URLs accordingly' do
        run

        results     = actual_results
        exp_results = expected_results

        actual_map   = results.delete( :map )
        expected_map = exp_results.delete( :map )

        actual_map.select { |k, v| k == :safe }.should be_eql expected_map.select { |k, v| k == :safe }
        actual_map.select { |k, v| k == :unsafe }.should be_eql expected_map.select { |k, v| k == :unsafe }

        results.should be_eql exp_results
    end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arachni-0.4.7 spec/plugins/healthmap_spec.rb
arachni-0.4.6 spec/plugins/healthmap_spec.rb
arachni-0.4.5.2 spec/plugins/healthmap_spec.rb
arachni-0.4.5.1 spec/plugins/healthmap_spec.rb
arachni-0.4.5 spec/plugins/healthmap_spec.rb
arachni-0.4.4 spec/plugins/healthmap_spec.rb
arachni-0.4.3.2 spec/plugins/healthmap_spec.rb
arachni-0.4.3.1 spec/plugins/healthmap_spec.rb
arachni-0.4.3 spec/plugins/healthmap_spec.rb