Added a unit test for nil value in permalink template keys
This commit is contained in:
parent
589919d58a
commit
382049d558
|
@ -47,5 +47,13 @@ class TestURL < Test::Unit::TestCase
|
||||||
).to_s
|
).to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "handle nil values for keys in the template" do
|
||||||
|
assert_equal '/foo/bar/', URL.new(
|
||||||
|
:template => "/baz",
|
||||||
|
:permalink => "/:x/:y/:z/",
|
||||||
|
:placeholders => {:x => "foo", :y => "bar", :z => nil}
|
||||||
|
).to_s
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue