Skip to content

Commit

Permalink
Add failing test for #7032
Browse files Browse the repository at this point in the history
  • Loading branch information
winniehell committed Aug 4, 2016
1 parent af7e669 commit c9e15be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spec/lib/banzai/filter/relative_link_filter_spec.rb
Expand Up @@ -84,6 +84,11 @@ def link(path)
to eq "/#{project_path}/blob/#{ref}/doc/api/README.md"
end

it 'ignores absolute URLs with two leading slashes' do
doc = filter(link('//doc/api/README.md'))
expect(doc.at_css('a')['href']).to eq '//doc/api/README.md'
end

it 'rebuilds relative URL for a file in the repo' do
doc = filter(link('doc/api/README.md'))
expect(doc.at_css('a')['href']).
Expand Down

0 comments on commit c9e15be

Please sign in to comment.