Sha256: ffbcb3a71e956a88ffd303ad291626b039700b6228b451f63c5efd93cf243864

Contents?: true

Size: 1.68 KB

Versions: 11

Compression:

Stored size: 1.68 KB

Contents

require 'spec_helper'

describe name_from_filename do
    include_examples 'plugin'

    before ( :all ) do
        options.url = url
    end

    def results
        {
            "#{url}" => {
                "X-Xss-Protection" => "1; mode=block",
                "X-Content-Type-Options" => "nosniff",
                "X-Frame-Options" => "SAMEORIGIN"
            },
            "#{url}1" => {
                "Weird" => "Value",
                "X-Xss-Protection" => "1; mode=block",
                "X-Content-Type-Options" => "nosniff",
                "X-Frame-Options" => "SAMEORIGIN"
            },
            "#{url}2" => {
                "Weird2" => "Value2",
                "X-Xss-Protection" => "1; mode=block",
                "X-Content-Type-Options" => "nosniff",
                "X-Frame-Options" => "SAMEORIGIN"
            }
        }

    end

    easy_test

    describe '.merge' do
        it 'merges the results of different instances' do
            results = [
                {
                    "#{url}" => {
                        'Name' => 'Value'
                    },
                },
                {
                    "#{url}" => {
                        'Name2' => 'Value2'
                    },
                    "#{url}2" => {
                        'Name22' => 'Value22'
                    },
                },
            ]

            expect(framework.plugins[component_name].merge( results )).to eq({
                "#{url}" => {
                    "Name" => "Value",
                    "Name2" => "Value2"
                },
                "#{url}2" => {
                    "Name22" => "Value22"
                }
            })
        end
    end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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