Checks for wp-content directly (depends on detection-mode) when not identified passively

This commit is contained in:
erwanlr
2019-04-12 13:55:40 +01:00
parent 86eb5d2d57
commit ae343b8cb0
5 changed files with 71 additions and 5 deletions

View File

@@ -19,8 +19,8 @@ describe WPScan::Controller::CustomDirectories do
end
describe '#before_scan' do
context 'when the content_dir is not found and not supply' do
before { expect(controller.target).to receive(:content_dir) }
context 'when the content_dir is not found and not supplied' do
before { expect(controller.target).to receive(:content_dir).with(:mixed) }
it 'raises an exception' do
expect { controller.before_scan }.to raise_error(WPScan::Error::WpContentDirNotDetected)