Sha256: a6eaca79f7b00c94e507d809856db5b16e6586b0b690ce12260902802a1219df

Contents?: true

Size: 1.03 KB

Versions: 11

Compression:

Stored size: 1.03 KB

Contents

require 'spec_helper'

describe name_from_filename do
    include_examples 'check'

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

    def self.elements
        [ Element::Form, Element::Link, Element::Cookie, Element::Header ]
    end

    elements.each do |element|
        element = element.type

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

            urls = framework.sitemap
            expect(urls).to include options.url + "#{element}/straight/trained"
            expect(urls).to include options.url + "#{element}/append/trained"
        end
    end

    context 'when the link count limit has been reached' do
        it 'does not run' do
            framework.options.scope.page_limit = 4
            audit :form, false

            urls = framework.sitemap
            expect(urls).not_to include "#{options.url}header/straight/trained"
            expect(urls).not_to include "#{options.url}header/append/trained"
        end
    end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
arachni-1.6.1.3 spec/components/checks/active/trainer_spec.rb
arachni-1.6.1.2 spec/components/checks/active/trainer_spec.rb
arachni-1.6.1.1 spec/components/checks/active/trainer_spec.rb
arachni-1.6.1 spec/components/checks/active/trainer_spec.rb
arachni-1.6.0 spec/components/checks/active/trainer_spec.rb
arachni-1.5.1 spec/components/checks/active/trainer_spec.rb
arachni-1.5 spec/components/checks/active/trainer_spec.rb
arachni-1.4 spec/components/checks/active/trainer_spec.rb
arachni-1.3.2 spec/components/checks/active/trainer_spec.rb
arachni-1.3.1 spec/components/checks/active/trainer_spec.rb
arachni-1.3 spec/components/checks/active/trainer_spec.rb