diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-03-25 19:31:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-25 19:31:35 +0100 |
commit | b58db8f12eb19787ee3bd1ec8abab21027b3d4ef (patch) | |
tree | 7050325491e122dbe1b8bc31484ef9b78e69583a /spec/lib | |
parent | 9565b17d5d743d7ae4028d484b407d649210f6d2 (diff) |
Add workaround for YouTube Shorts links (#17869)
* Add workaround for YouTube Shorts links * Update link_details_extractor_spec.rb
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/link_details_extractor_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/link_details_extractor_spec.rb b/spec/lib/link_details_extractor_spec.rb index 84bb4579c..7ea867c61 100644 --- a/spec/lib/link_details_extractor_spec.rb +++ b/spec/lib/link_details_extractor_spec.rb @@ -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 |