From 62b11b5893a4ede374c9d38567582997723be170 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Tue, 23 Oct 2018 16:27:54 +0200 Subject: [PATCH] test: use categories in post --- .../_posts/2014-03-04-march-the-fourth.md | 2 +- spec/jekyll-feed_spec.rb | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/spec/fixtures/_posts/2014-03-04-march-the-fourth.md b/spec/fixtures/_posts/2014-03-04-march-the-fourth.md index 2401ecc3..817ee53b 100644 --- a/spec/fixtures/_posts/2014-03-04-march-the-fourth.md +++ b/spec/fixtures/_posts/2014-03-04-march-the-fourth.md @@ -3,7 +3,7 @@ tags: - '"/>' image: path: "/object-image.png" -category: updates +categories: updates jekyll --- March the fourth! diff --git a/spec/jekyll-feed_spec.rb b/spec/jekyll-feed_spec.rb index 1a8cc5c7..e748a406 100644 --- a/spec/jekyll-feed_spec.rb +++ b/spec/jekyll-feed_spec.rb @@ -43,7 +43,8 @@ end it "puts all the posts in the feed.xml file" do - expect(contents).to match "http://example.org/updates/2014/03/04/march-the-fourth.html" + + expect(contents).to match "http://example.org/updates/jekyll/2014/03/04/march-the-fourth.html" expect(contents).to match "http://example.org/news/2014/03/02/march-the-second.html" expect(contents).to match "http://example.org/news/2013/12/12/dec-the-second.html" expect(contents).to match "http://example.org/2015/08/08/stuck-in-the-middle.html" @@ -239,7 +240,7 @@ end it "correctly adds the baseurl to the posts" do - expect(contents).to match "http://example.org/bass/updates/2014/03/04/march-the-fourth.html" + expect(contents).to match "http://example.org/bass/updates/jekyll/2014/03/04/march-the-fourth.html" expect(contents).to match "http://example.org/bass/news/2014/03/02/march-the-second.html" expect(contents).to match "http://example.org/bass/news/2013/12/12/dec-the-second.html" end @@ -344,7 +345,7 @@ let(:news_feed) { File.read(dest_dir("feed/news.xml")) } it "outputs the primary feed" do - expect(contents).to match "http://example.org/updates/2014/03/04/march-the-fourth.html" + expect(contents).to match "http://example.org/updates/jekyll/2014/03/04/march-the-fourth.html" expect(contents).to match "http://example.org/news/2014/03/02/march-the-second.html" expect(contents).to match "http://example.org/news/2013/12/12/dec-the-second.html" expect(contents).to match "http://example.org/2015/08/08/stuck-in-the-middle.html" @@ -355,7 +356,7 @@ expect(news_feed).to match 'My awesome site | News' expect(news_feed).to match "http://example.org/news/2014/03/02/march-the-second.html" expect(news_feed).to match "http://example.org/news/2013/12/12/dec-the-second.html" - expect(news_feed).to_not match "http://example.org/updates/2014/03/04/march-the-fourth.html" + expect(news_feed).to_not match "http://example.org/updates/jekyll/2014/03/04/march-the-fourth.html" expect(news_feed).to_not match "http://example.org/2015/08/08/stuck-in-the-middle.html" end end @@ -375,7 +376,7 @@ let(:news_feed) { File.read(dest_dir("feed/news.xml")) } it "outputs the primary feed" do - expect(contents).to match "http://example.org/updates/2014/03/04/march-the-fourth.html" + expect(contents).to match "http://example.org/updates/jekyll/2014/03/04/march-the-fourth.html" expect(contents).to match "http://example.org/news/2014/03/02/march-the-second.html" expect(contents).to match "http://example.org/news/2013/12/12/dec-the-second.html" expect(contents).to match "http://example.org/2015/08/08/stuck-in-the-middle.html" @@ -386,7 +387,7 @@ expect(news_feed).to match 'My awesome site | News' expect(news_feed).to match "http://example.org/news/2014/03/02/march-the-second.html" expect(news_feed).to match "http://example.org/news/2013/12/12/dec-the-second.html" - expect(news_feed).to_not match "http://example.org/updates/2014/03/04/march-the-fourth.html" + expect(news_feed).to_not match "http://example.org/updates/jekyll/2014/03/04/march-the-fourth.html" expect(news_feed).to_not match "http://example.org/2015/08/08/stuck-in-the-middle.html" end end @@ -411,7 +412,7 @@ expect(collection_feed).to match 'My awesome site | Collection' expect(collection_feed).to match "http://example.org/collection/2018-01-01-collection-doc.html" expect(collection_feed).to match "http://example.org/collection/2018-01-02-collection-category-doc.html" - expect(collection_feed).to_not match "http://example.org/updates/2014/03/04/march-the-fourth.html" + expect(collection_feed).to_not match "http://example.org/updates/jekyll/2014/03/04/march-the-fourth.html" expect(collection_feed).to_not match "http://example.org/2015/08/08/stuck-in-the-middle.html" end end @@ -439,7 +440,7 @@ expect(news_feed).to match 'My awesome site | Collection | News' expect(news_feed).to match "http://example.org/collection/2018-01-02-collection-category-doc.html" expect(news_feed).to_not match "http://example.org/collection/2018-01-01-collection-doc.html" - expect(news_feed).to_not match "http://example.org/updates/2014/03/04/march-the-fourth.html" + expect(news_feed).to_not match "http://example.org/updates/jekyll/2014/03/04/march-the-fourth.html" expect(news_feed).to_not match "http://example.org/2015/08/08/stuck-in-the-middle.html" end end