diff options
Diffstat (limited to 'spec/lib/banzai/filter/wiki_link_filter_spec.rb')
-rw-r--r-- | spec/lib/banzai/filter/wiki_link_filter_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/wiki_link_filter_spec.rb b/spec/lib/banzai/filter/wiki_link_filter_spec.rb index d2d539a62fc..4587bd85939 100644 --- a/spec/lib/banzai/filter/wiki_link_filter_spec.rb +++ b/spec/lib/banzai/filter/wiki_link_filter_spec.rb @@ -60,6 +60,14 @@ describe Banzai::Filter::WikiLinkFilter do expect(filtered_link.attribute('src').value).to eq("#{wiki.wiki_base_path}/#{repository_upload_folder}/a.mp4") end end + + context 'with "audio" html tag' do + it 'rewrites links' do + filtered_link = filter("<audio src='#{repository_upload_folder}/a.wav'></audio>", project_wiki: wiki).children[0] + + expect(filtered_link.attribute('src').value).to eq("#{wiki.wiki_base_path}/#{repository_upload_folder}/a.wav") + end + end end describe "invalid links" do |