|
@@ -25,6 +25,14 @@ RSpec.describe LinkDetailsExtractor do
|
|
|
expect(subject.canonical_url).to eq 'https://foo.com/article'
|
|
|
end
|
|
|
end
|
|
|
+
|
|
|
+ context 'when canonical URL is set to "null"' do
|
|
|
+ let(:html) { '<!doctype html><link rel="canonical" href="null" />' }
|
|
|
+
|
|
|
+ it 'ignores the canonical URLs' do
|
|
|
+ expect(subject.canonical_url).to eq original_url
|
|
|
+ end
|
|
|
+ end
|
|
|
end
|
|
|
|
|
|
context 'when structured data is present' do
|