Sha256: 19b61d52cff5d155d2e7f69289fed45d6ad2d8ec68b1a3f1ca746cdc51a024e0

Contents?: true

Size: 1.5 KB

Versions: 9

Compression:

Stored size: 1.5 KB

Contents

require 'spec_helper'

describe Arachni::Element::Header do
    it_should_behave_like 'auditable', url: web_server_url_for( :header ),
                          single_input: true

    before( :all ) do
        @url = web_server_url_for( :header )

        @inputs = { 'My-header' => 'header_value' }
        @header = Arachni::Element::Header.new( @url, @inputs )
    end

    it 'is be assigned to Arachni::Header for easy access' do
        Arachni::Header.should == Arachni::Element::Header
    end

    describe 'Arachni::Element::HEADER' do
        it 'returns "header"' do
            Arachni::Element::HEADER.should == 'header'
        end
    end

    it 'retains its assigned inputs' do
        @header.auditable.should == @inputs
    end

    describe '#simple' do
        it 'returns the inputs as is' do
            @header.simple.should == @inputs
        end
    end

    describe '#mutations' do
        describe :param_flip do
            it 'creates a new header' do
                @header.mutations( 'seed', param_flip: true ).last.auditable.keys.should ==
                    %w(seed)
            end
        end
    end

    describe '#name' do
        it 'returns the header name' do
            @header.name.should == 'My-header'
        end
    end

    describe '#value' do
        it 'returns the header value' do
            @header.value.should == 'header_value'
        end
    end

    describe '#type' do
        it 'is "header"' do
            @header.type.should == 'header'
        end
    end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
arachni-0.4.7 spec/arachni/element/header_spec.rb
arachni-0.4.6 spec/arachni/element/header_spec.rb
arachni-0.4.5.2 spec/arachni/element/header_spec.rb
arachni-0.4.5.1 spec/arachni/element/header_spec.rb
arachni-0.4.5 spec/arachni/element/header_spec.rb
arachni-0.4.4 spec/arachni/element/header_spec.rb
arachni-0.4.3.2 spec/arachni/element/header_spec.rb
arachni-0.4.3.1 spec/arachni/element/header_spec.rb
arachni-0.4.3 spec/arachni/element/header_spec.rb