diff --git a/test/test_tags.rb b/test/test_tags.rb index 09dd1003..da5a62f3 100644 --- a/test/test_tags.rb +++ b/test/test_tags.rb @@ -211,7 +211,10 @@ CONTENT title: Post linking --- -{% post_url es/2008-11-21-nested %} +- 1 {% post_url 2008-11-21-complex %} +- 2 {% post_url /2008-11-21-complex %} +- 3 {% post_url es/2008-11-21-nested %} +- 4 {% post_url /es/2008-11-21-nested %} CONTENT create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true}) end @@ -220,8 +223,14 @@ CONTENT assert_no_match /markdown\-html\-error/, @result end - should "have the url to the \"complex\" post from 2008-11-21" do - assert_match %r{/2008/11/21/nested/}, @result + should "have the url to the \"nested\" post from 2008-11-21" do + assert_match %r{1\s/2008/11/21/complex/}, @result + assert_match %r{2\s/2008/11/21/complex/}, @result + end + + should "have the url to the \"nested\" post from 2008-11-21" do + assert_match %r{3\s/2008/11/21/nested/}, @result + assert_match %r{4\s/2008/11/21/nested/}, @result end end