Add test for nested post_url
This commit is contained in:
		
							parent
							
								
									fc09ac4862
								
							
						
					
					
						commit
						805f378586
					
				| 
						 | 
				
			
			@ -0,0 +1,8 @@
 | 
			
		|||
---
 | 
			
		||||
layout: default
 | 
			
		||||
title: Nested
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
url: {{ page.url }}
 | 
			
		||||
date: {{ page.date }}
 | 
			
		||||
id: {{ page.id }}
 | 
			
		||||
| 
						 | 
				
			
			@ -14,7 +14,7 @@ class TestGeneratedSite < Test::Unit::TestCase
 | 
			
		|||
    end
 | 
			
		||||
 | 
			
		||||
    should "ensure post count is as expected" do
 | 
			
		||||
      assert_equal 32, @site.posts.size
 | 
			
		||||
      assert_equal 33, @site.posts.size
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    should "insert site.posts into the index" do
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -204,6 +204,27 @@ CONTENT
 | 
			
		|||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  context "simple page with nested post linking" do
 | 
			
		||||
    setup do
 | 
			
		||||
      content = <<CONTENT
 | 
			
		||||
---
 | 
			
		||||
title: Post linking
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
{% post_url es/2008-11-21-nested %}
 | 
			
		||||
CONTENT
 | 
			
		||||
      create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    should "not cause an error" do
 | 
			
		||||
      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
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  context "gist tag" do
 | 
			
		||||
    context "simple" do
 | 
			
		||||
      setup do
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue