Sha256: 85cb256e706cd065256d334a049b420f78170a7e2a8dbd9c9158171c669bebdd

Contents?: true

Size: 1.24 KB

Versions: 10

Compression:

Stored size: 1.24 KB

Contents

require 'spec_helper'

describe name_from_filename do
    include_examples 'plugin'

    def url
        Arachni::Utilities.normalize_url web_server_url_for( component_name )
    end

    context 'when malicious requests are' do
        context 'being rejected' do
            it 'logs that a WAF exists' do
                options.url = "#{url}positive"

                run

                actual_results.should == {
                    'status'  => 'found',
                    'message' => plugin::STATUSES[:found]
                }
            end
        end

        context 'being accepted' do
            it 'does not log a WAF' do
                options.url = "#{url}negative"

                run

                actual_results.should == {
                    'status'  => 'not_found',
                    'message' => plugin::STATUSES[:not_found]
                }
            end
        end
    end

    context 'when the webapp behaves erratically' do
        it 'logs that the tests were inconclusive' do
            options.url = "#{url}inconclusive"

            run

            actual_results.should == {
                'status'  => 'inconclusive',
                'message' => plugin::STATUSES[:inconclusive]
            }
        end
    end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
arachni-1.2.1 spec/components/plugins/waf_detector_spec.rb
arachni-1.2 spec/components/plugins/waf_detector_spec.rb
arachni-1.1 spec/components/plugins/waf_detector_spec.rb
arachni-1.0.6 spec/components/plugins/waf_detector_spec.rb
arachni-1.0.5 spec/components/plugins/waf_detector_spec.rb
arachni-1.0.4 spec/components/plugins/waf_detector_spec.rb
arachni-1.0.3 spec/components/plugins/waf_detector_spec.rb
arachni-1.0.2 spec/components/plugins/waf_detector_spec.rb
arachni-1.0.1 spec/components/plugins/waf_detector_spec.rb
arachni-1.0 spec/components/plugins/waf_detector_spec.rb