Testing Database Export Finder Implementation in WPScan
This test suite validates the database export functionality in WPScan, focusing on the base finder implementation and known locations detection. The tests ensure proper initialization and configuration of database export finders for WordPress security scanning.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
wpscanteam/wpscan
spec/app/finders/db_exports_spec.rb
# frozen_string_literal: true
describe WPScan::Finders::DbExports::Base do
subject(:db_exports) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }
let(:url) { 'http://ex.lo/' }
describe '#finders' do
it 'contains the expected finders' do
expect(db_exports.finders.map { |f| f.class.to_s.demodulize }).to eq %w[KnownLocations]
end
end
end