test/test_iri.rb in iri-0.4.2 vs test/test_iri.rb in iri-0.4.3
- old
+ new
@@ -126,9 +126,20 @@
'http://google/a/b/z+%2F+7/42?x=3',
Iri.new('http://google/a/b?x=3').append('z / 7').append(42).to_s
)
end
+ def test_appends_empty_path
+ assert_equal(
+ 'http://google.com/hello/',
+ Iri.new('http://google.com/hello').append('').append('').to_s
+ )
+ assert_equal(
+ 'http://google.com/test',
+ Iri.new('http://google.com/hello').cut.append('test').to_s
+ )
+ end
+
def test_replaces_query_param
assert_equal(
'http://google/?a=hey&b=2&c=3',
Iri.new('http://google/?a=1&b=2&c=3&a=33').over(a: 'hey').to_s
)