Path: blob/master/spec/app/finders/interesting_findings/wp_cron_spec.rb
1483 views
# frozen_string_literal: true12describe WPScan::Finders::InterestingFindings::WPCron do3subject(:finder) { described_class.new(target) }4let(:target) { WPScan::Target.new(url) }5let(:url) { 'http://ex.lo/' }6let(:wp_content) { 'wp-content' }78before { expect(target).to receive(:sub_dir).at_least(1).and_return(false) }910describe '#aggressive' do11before { stub_request(:get, finder.wp_cron_url).to_return(status: status) }1213context 'when 200' do14let(:status) { 200 }1516it 'returns the InterestingFinding' do17expect(finder.aggressive).to eql WPScan::Model::WPCron.new(18finder.wp_cron_url,19confidence: 60,20found_by: described_class::DIRECT_ACCESS21)22end23end2425context 'otherwise' do26let(:status) { 403 }2728its(:aggressive) { should be_nil }29end30end31end323334