+
+
+
diff --git a/spec/shared_examples/wp_item_existable.rb b/spec/shared_examples/wp_item_existable.rb
index dd3c1517..3e0d2d8f 100644
--- a/spec/shared_examples/wp_item_existable.rb
+++ b/spec/shared_examples/wp_item_existable.rb
@@ -1,6 +1,7 @@
# encoding: UTF-8
shared_examples 'WpItem::Existable' do
+ let(:fixtures_dir) { MODELS_FIXTURES + '/wp_item/existable' }
describe '#exists?' do
context 'when the response is supplied' do
@@ -75,6 +76,19 @@ shared_examples 'WpItem::Existable' do
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
diff --git a/spec/shared_examples/wp_item_infos.rb b/spec/shared_examples/wp_item_infos.rb
index eabfdb6a..575add79 100644
--- a/spec/shared_examples/wp_item_infos.rb
+++ b/spec/shared_examples/wp_item_infos.rb
@@ -2,7 +2,7 @@
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 :
# let(:changelog_url) { }
# let(:error_log_url) { }
diff --git a/spec/shared_examples/wp_items_detectable.rb b/spec/shared_examples/wp_items_detectable.rb
index 0b4f54a4..66473ce2 100644
--- a/spec/shared_examples/wp_items_detectable.rb
+++ b/spec/shared_examples/wp_items_detectable.rb
@@ -195,7 +195,6 @@ shared_examples 'WpItems::Detectable' do
@expected = subject.new
end
end
-
end
context 'when no :only_vulnerable' do