Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wpscanteam
GitHub Repository: wpscanteam/wpscan
Path: blob/master/spec/lib/browser_spec.rb
485 views
1
# frozen_string_literal: true
2
3
describe WPScan::Browser do
4
subject(:browser) { described_class.instance(options) }
5
let(:options) { {} }
6
7
before { described_class.reset }
8
9
describe '#user_agent' do
10
context 'when not set' do
11
its(:user_agent) { should eq "WPScan v#{WPScan::VERSION} (https://wpscan.com/wordpress-security-scanner)" }
12
end
13
14
context 'when set' do
15
let(:options) { super().merge(user_agent: 'Custom UA') }
16
17
its(:user_agent) { should eq options[:user_agent] }
18
end
19
end
20
end
21
22