Additional specs for #169
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="sv-SE" xml:lang="sv-SE">
|
||||||
|
<head profile="http://gmpg.org/xfn/11"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
|
<meta name="distribution" content="global" />
|
||||||
|
<meta name="language" content="sv-SE" />
|
||||||
|
<link rel="pingback" href="http://lamp/xmlrpc.php" />
|
||||||
|
<!-- This site is optimized with the Yoast WordPress SEO plugin v1.4.4 - http://yoast.com/wordpress/seo/ -->
|
||||||
|
<title>Lamp Testing</title>
|
||||||
|
<meta name="description" content="Another Lamp"/>
|
||||||
|
<link rel="canonical" href="http://lamp/" />
|
||||||
|
<link rel="next" href="http://lamp/page/2/" />
|
||||||
|
<!-- / Yoast WordPress SEO plugin. -->
|
||||||
|
<body>
|
||||||
|
<div>
|
||||||
|
</div> <!--End of footer class for sticky footer -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/
|
||||||
|
|
||||||
|
Served from: lamp @ 2013-04-16 16:11:09 by W3 Total Cache -->
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
# encoding: UTF-8
|
# encoding: UTF-8
|
||||||
|
|
||||||
shared_examples 'WpItem::Existable' do
|
shared_examples 'WpItem::Existable' do
|
||||||
|
let(:fixtures_dir) { MODELS_FIXTURES + '/wp_item/existable' }
|
||||||
|
|
||||||
describe '#exists?' do
|
describe '#exists?' do
|
||||||
context 'when the response is supplied' do
|
context 'when the response is supplied' do
|
||||||
@@ -75,6 +76,19 @@ shared_examples 'WpItem::Existable' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when it\'s a redirect to the homepage' do
|
||||||
|
context 'and the cache generation time is in comment tag' do
|
||||||
|
let(:body) { File.new(fixtures_dir + '/cache_generation.html').read }
|
||||||
|
let(:uncommented_body) { body.gsub(/<!--.*?-->/m, '') }
|
||||||
|
let(:exists_options) { { homepage_hash: Digest::MD5.hexdigest(uncommented_body) } }
|
||||||
|
|
||||||
|
it 'returns false' do
|
||||||
|
@resp_opt = { code: 200, body: body }
|
||||||
|
@expected = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
shared_examples 'WpItem::Infos' do
|
shared_examples 'WpItem::Infos' do
|
||||||
|
|
||||||
# 3 expected urls have to be set in the described class (or subject)
|
# 2 expected urls have to be set in the described class (or subject)
|
||||||
# e.g :
|
# e.g :
|
||||||
# let(:changelog_url) { }
|
# let(:changelog_url) { }
|
||||||
# let(:error_log_url) { }
|
# let(:error_log_url) { }
|
||||||
|
|||||||
@@ -195,7 +195,6 @@ shared_examples 'WpItems::Detectable' do
|
|||||||
@expected = subject.new
|
@expected = subject.new
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when no :only_vulnerable' do
|
context 'when no :only_vulnerable' do
|
||||||
|
|||||||
Reference in New Issue
Block a user