Sha256: 61e642594c74ed0b3bfae151d80f5bcda2040c5f666950233b60a526922c01ae

Contents?: true

Size: 1.06 KB

Versions: 6

Compression:

Stored size: 1.06 KB

Contents

Factory.define :report_data do
    issues = Arachni::Data::Issues.new

    (0..10).map do |i|
        issues << Factory[:passive_issue].tap { |issue| issue.vector.action += i.to_s }
        issues << Factory[:active_issue].tap { |issue| issue.vector.action += i.to_s }
    end

    {
        options:  Arachni::Options.to_hash,
        sitemap:  { Arachni::Options.url => 200 },
        issues:   issues,
        plugins:  {
            plugin_name: {
                results: 'stuff',
                options: [
                    Arachni::Component::Options::MultipleChoice.new(
                        'some_name',
                        description:  'Some description.',
                        default:      'default_value',
                        choices: %w(available values go here)
                    )
                ]
            }
        },
        start_datetime:  Time.now - 10_000,
        finish_datetime: Time.now
    }
end

Factory.define :report do
    Arachni::Report.new Factory[:report_data]
end

Factory.define :report_empty do
    Arachni::Report.new
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
arachni-1.4 spec/support/factories/scan_report.rb
arachni-1.3.2 spec/support/factories/scan_report.rb
arachni-1.3.1 spec/support/factories/scan_report.rb
arachni-1.3 spec/support/factories/scan_report.rb
arachni-1.2.1 spec/support/factories/scan_report.rb
arachni-1.2 spec/support/factories/scan_report.rb