Additional specs for #1374

This commit is contained in:
erwanlr
2019-07-23 16:26:13 +01:00
parent 0e9eb34626
commit 4ce39951a9
3 changed files with 33 additions and 5 deletions

View File

@@ -47,7 +47,7 @@ describe WPScan::DB::DynamicFinders::Plugin do
describe '.create_versions_finders' do
# handled and tested in spec/lib/finders/dynamic_finders/plugin_version_spec
describe 'Try to create the finders twice' do
context 'When trying to create the finders twice' do
# let's just test one slug, no need to test them all
let(:slug) { '12-step-meeting-list' }
@@ -57,6 +57,14 @@ describe WPScan::DB::DynamicFinders::Plugin do
expect { WPScan::DB::DynamicFinders::Plugin.create_versions_finders(slug) }.to_not raise_error
end
end
context 'when the slug contains non alpha-numeric chars' do
let(:slug) { 'test.something' }
it 'sanitize it and does not raise an error' do
expect { WPScan::DB::DynamicFinders::Plugin.create_versions_finders(slug) }.to_not raise_error
end
end
end
describe '.version_finder_super_class' do