From ef5e8a1797d6b5b17be31193762a1653a9334f2b Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Wed, 1 Oct 2014 15:03:22 +1300 Subject: [PATCH 1/2] Add test post to demonstrate issue with tags with incorrect cases --- .../_posts/2014-10-01-post-with-incorrect-cased-tag.md | 6 ++++++ test/test_jekyll_archives.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 test/source/_posts/2014-10-01-post-with-incorrect-cased-tag.md diff --git a/test/source/_posts/2014-10-01-post-with-incorrect-cased-tag.md b/test/source/_posts/2014-10-01-post-with-incorrect-cased-tag.md new file mode 100644 index 0000000..9882702 --- /dev/null +++ b/test/source/_posts/2014-10-01-post-with-incorrect-cased-tag.md @@ -0,0 +1,6 @@ +--- +title: Tagged post +tags: ["test tag", Tagged] +--- + +This is a post with tags in incorect case diff --git a/test/test_jekyll_archives.rb b/test/test_jekyll_archives.rb index e3621a6..9d9b89d 100644 --- a/test/test_jekyll_archives.rb +++ b/test/test_jekyll_archives.rb @@ -120,7 +120,7 @@ class TestJekyllArchives < Minitest::Test end should "populate the {{ site.archives }} tag in Liquid" do - assert_equal 12, read_file("length.html").to_i + assert_equal 14, read_file("length.html").to_i end end From 6660067b9136b428360bdde6ab8303f547e79f2e Mon Sep 17 00:00:00 2001 From: Alexander Zaytsev Date: Wed, 1 Oct 2014 15:12:15 +1300 Subject: [PATCH 2/2] Modify tests to show that posts are missing --- test/source/_layouts/archive.html | 2 +- test/test_jekyll_archives.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/source/_layouts/archive.html b/test/source/_layouts/archive.html index 345e6ae..060968b 100644 --- a/test/source/_layouts/archive.html +++ b/test/source/_layouts/archive.html @@ -1 +1 @@ -Test +{{ page.posts.size }} diff --git a/test/test_jekyll_archives.rb b/test/test_jekyll_archives.rb index 9d9b89d..f40cdc3 100644 --- a/test/test_jekyll_archives.rb +++ b/test/test_jekyll_archives.rb @@ -44,7 +44,7 @@ class TestJekyllArchives < Minitest::Test should "generate archive pages with a layout" do @site.process - assert_equal "Test", read_file("tag/test-tag/index.html") + assert_equal "2", read_file("tag/test-tag/index.html") end end @@ -81,7 +81,7 @@ class TestJekyllArchives < Minitest::Test should "use custom layout for specific type only" do assert_equal "Test too", read_file("/2014/index.html") assert_equal "Test too", read_file("/2013/index.html") - assert_equal "Test", read_file("/tag/test-tag/index.html") + assert_equal "2", read_file("/tag/test-tag/index.html") end end