Uses ParsedCli
This commit is contained in:
@@ -24,12 +24,10 @@ end
|
||||
describe WPScan::Controller::WpVersion do
|
||||
subject(:controller) { described_class.new }
|
||||
let(:target_url) { 'http://ex.lo/' }
|
||||
let(:parsed_options) { rspec_parsed_options(cli_args) }
|
||||
let(:cli_args) { "--url #{target_url}" }
|
||||
|
||||
before do
|
||||
WPScan::Browser.reset
|
||||
described_class.parsed_options = parsed_options
|
||||
WPScan::ParsedCli.options = rspec_parsed_options(cli_args)
|
||||
end
|
||||
|
||||
describe '#cli_options' do
|
||||
@@ -46,8 +44,8 @@ describe WPScan::Controller::WpVersion do
|
||||
expect(controller.target).to receive(:wp_version)
|
||||
.with(
|
||||
hash_including(
|
||||
mode: parsed_options[:wp_version_detection] || parsed_options[:detection_mode],
|
||||
confidence_threshold: parsed_options[:wp_version_all] ? 0 : 100
|
||||
mode: WPScan::ParsedCli.wp_version_detection || WPScan::ParsedCli.detection_mode,
|
||||
confidence_threshold: WPScan::ParsedCli.wp_version_all ? 0 : 100
|
||||
)
|
||||
).and_return(stubbed)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user