Added a unit test for nil value in permalink template keys

This commit is contained in:
Brandon Mathis 2015-01-18 15:51:21 -06:00
parent 589919d58a
commit 382049d558
1 changed files with 8 additions and 0 deletions

View File

@ -47,5 +47,13 @@ class TestURL < Test::Unit::TestCase
).to_s
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