spec/postrank-uri_spec.rb in postrank-uri-1.0.23 vs spec/postrank-uri_spec.rb in postrank-uri-1.0.24
- old
+ new
@@ -96,9 +96,13 @@
expect(n('http://igvita.com/a/')).to eq('http://igvita.com/a')
expect(n('http://igvita.com/a/b')).to eq('http://igvita.com/a/b')
expect(n('http://igvita.com/a/b/')).to eq('http://igvita.com/a/b')
end
+ it 'preserves nested urls' do
+ expect(n('http://igvita.com/a/b/http://hello.com')).to eq('http://igvita.com/a/b/http://hello.com')
+ expect(n('http://igvita.com/a//b/https://hello.com')).to eq('http://igvita.com/a/b/https://hello.com')
+ end
end
context "canonicalization" do
def c(uri)
PostRank::URI.c14n(uri).to_s