Moves Models into their own namespace - Ref #1315

This commit is contained in:
erwanlr
2019-03-19 21:07:53 +00:00
parent f1657164d5
commit 898e8d4546
116 changed files with 613 additions and 560 deletions

View File

@@ -30,7 +30,7 @@ WPScan::DB::DynamicFinders::Plugin.versions_finders_configs.each do |slug, confi
# If someone find a fix for that, please share!
describe df_tested_class_constant('PluginVersion', finder_class, slug), slow: true do
subject(:finder) { described_class.new(plugin) }
let(:plugin) { WPScan::Plugin.new(slug, target) }
let(:plugin) { WPScan::Model::Plugin.new(slug, target) }
let(:target) { WPScan::Target.new('http://wp.lab/') }
let(:fixtures) { DYNAMIC_FINDERS_FIXTURES.join('plugin_version') }
@@ -75,7 +75,7 @@ WPScan::DB::DynamicFinders::Plugin.versions_finders_configs.each do |slug, confi
found.each_with_index do |version, index|
expected_version = expected.at(index)
expect(version).to be_a WPScan::Version
expect(version).to be_a WPScan::Model::Version
expect(version.number).to eql expected_version['number'].to_s
expect(version.found_by).to eql expected_version['found_by']
expect(version.interesting_entries).to match_array expected_version['interesting_entries']
@@ -117,7 +117,7 @@ WPScan::DB::DynamicFinders::Plugin.versions_finders_configs.each do |slug, confi
found.each_with_index do |version, index|
expected_version = expected.at(index)
expect(version).to be_a WPScan::Version
expect(version).to be_a WPScan::Model::Version
expect(version.number).to eql expected_version['number'].to_s
expect(version.found_by).to eql expected_version['found_by']
expect(version.interesting_entries).to match_array expected_version['interesting_entries']