Sha256: b1a12f319704a1bfffe849e61f07d2209f0ac13fdd049c8980a1e120a735a8ce

Contents?: true

Size: 855 Bytes

Versions: 11

Compression:

Stored size: 855 Bytes

Contents

require 'spec_helper'

describe name_from_filename do
    include_examples 'check'

    def self.elements
        [ Element::Server ]
    end

    it 'logs HTTP responses with status codes other than 200 or 404' do
        run
        current_check.acceptable.each do |code|
            http.get( url + code.to_s )
        end
        current_check.acceptable.each do |code|
            http.get( url + 'blah/' + code.to_s )
        end
        http.run

        max_issues = current_check.max_issues
        expect(issues.size).to eq(max_issues)
    end

    it 'skips HTTP responses which are out of scope' do
        options.scope.exclude_path_patterns << /blah/

        run

        current_check.acceptable.each do |code|
            http.get( url + 'blah/' + code.to_s )
        end
        http.run

        expect(issues).to be_empty
    end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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