HELLO v3!!!

This commit is contained in:
Ryan Dewhurst
2018-09-26 21:12:01 +02:00
parent 28b9c15256
commit d268a86795
1871 changed files with 988118 additions and 0 deletions

31
spec/lib/browser_spec.rb Normal file
View File

@@ -0,0 +1,31 @@
require 'spec_helper'
describe WPScan::Browser do
subject(:browser) { described_class.instance(options) }
before { described_class.reset }
let(:options) { {} }
describe '#user_agents_list' do
context 'when not set' do
its(:user_agents_list) { should eql File.join(WPScan::DB_DIR, 'user-agents.txt') }
end
context 'when set' do
let(:options) { super().merge(user_agents_list: 'test.txt') }
its(:user_agents_list) { should eql 'test.txt' }
end
end
describe '#user_agent' do
context 'when not set' do
its(:user_agent) { should eq "WPScan v#{WPScan::VERSION} (https://wpscan.org/)" }
end
context 'when set' do
let(:options) { super().merge(user_agent: 'Custom UA') }
its(:user_agent) { should eq options[:user_agent] }
end
end
end