Ref #455 - Fails with a message if the target returns a 403 during the wordpress check

This commit is contained in:
erwanlr
2014-04-15 17:02:22 +02:00
parent 212b068a8d
commit 8038e2e01a
2 changed files with 13 additions and 0 deletions

View File

@@ -97,6 +97,14 @@ describe WpTarget do
wp_target.should_not be_wordpress
end
end
context 'when the response is a 403' do
before { stub_request(:any, /.*/).to_return(status: 403) }
it 'raises an error' do
expect { wp_target.wordpress? }.to raise_error
end
end
end
describe '#wordpress_hosted?' do