From 382049d558b49ea60e308eab345ec942432866e2 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sun, 18 Jan 2015 15:51:21 -0600 Subject: [PATCH] Added a unit test for nil value in permalink template keys --- test/test_url.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_url.rb b/test/test_url.rb index 15f989d8..ea11fb09 100644 --- a/test/test_url.rb +++ b/test/test_url.rb @@ -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