Test all cases for post_url modifications. #998

This commit is contained in:
Parker Moore 2013-05-05 15:13:17 +02:00
parent 9179f56ed7
commit 20334aabbe
1 changed files with 12 additions and 3 deletions

View File

@ -211,7 +211,10 @@ CONTENT
title: Post linking 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 CONTENT
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true}) create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
end end
@ -220,8 +223,14 @@ CONTENT
assert_no_match /markdown\-html\-error/, @result assert_no_match /markdown\-html\-error/, @result
end end
should "have the url to the \"complex\" post from 2008-11-21" do should "have the url to the \"nested\" post from 2008-11-21" do
assert_match %r{/2008/11/21/nested/}, @result 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
end end