Sha256: 1d62d417369f24cdd7d71fd48a8863775b91d25fa100244d7a32558308beb32f

Contents?: true

Size: 817 Bytes

Versions: 9

Compression:

Stored size: 817 Bytes

Contents

require 'spec_helper'

describe name_from_filename do
    include_examples 'module'

    def self.targets
        %w(Generic)
    end

    def self.elements
        [ Element::SERVER ]
    end

    it 'intercepts all HTTP responses and log ones with status codes other than 200 or 404' do
        run
        current_module.acceptable.each do |code|
            http.get( url + code.to_s )
        end
        current_module.acceptable.each do |code|
            http.get( url + 'blah/' + code.to_s )
        end
        http.run

        max_issues = current_module.max_issues
        issues.size.should == max_issues
        issues.map{ |i| i.id.gsub( /\D/, '').to_i }.uniq.sort.should ==
            (current_module.acceptable - current_module::IGNORE_CODES.to_a).
                sort[0...max_issues]
    end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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