Sha256: 3e13aea645acea4522357ab64ab0483eae62248eca08ca3dd42beaa100a697b1

Contents?: true

Size: 962 Bytes

Versions: 9

Compression:

Stored size: 962 Bytes

Contents

require 'spec_helper'

describe name_from_filename do
    include_examples 'module'

    before( :each ){ framework.sitemap.clear }

    def self.targets
        %w(Generic)
    end

    def self.elements
        [ Element::FORM, Element::LINK, Element::COOKIE, Element::HEADER ]
    end

    elements.each do |element|
        it "probes #{element}s" do
            # audit the current element type but don't expect any issues
            audit element.to_sym, false

            urls = framework.auditstore.sitemap
            urls.include?( options.url + "#{element}/straight/trained" ).should be_true
            urls.include?( options.url + "#{element}/append/trained" ).should be_true
        end
    end

    context 'when the link count limit has been reached' do
        it 'does not run' do
            framework.opts.link_count_limit = 0
            audit :form, false
            framework.auditstore.sitemap.should be_empty
        end
    end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arachni-0.4.7 spec/modules/audit/trainer_spec.rb
arachni-0.4.6 spec/modules/audit/trainer_spec.rb
arachni-0.4.5.2 spec/modules/audit/trainer_spec.rb
arachni-0.4.5.1 spec/modules/audit/trainer_spec.rb
arachni-0.4.5 spec/modules/audit/trainer_spec.rb
arachni-0.4.4 spec/modules/audit/trainer_spec.rb
arachni-0.4.3.2 spec/modules/audit/trainer_spec.rb
arachni-0.4.3.1 spec/modules/audit/trainer_spec.rb
arachni-0.4.3 spec/modules/audit/trainer_spec.rb