Skip to content

Commit

Permalink
test: use categories in post
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtyF committed Nov 14, 2018
1 parent e97bc64 commit 62b11b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion spec/fixtures/_posts/2014-03-04-march-the-fourth.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ tags:
- '"/><VADER>'
image:
path: "/object-image.png"
category: updates
categories: updates jekyll
---

March the fourth!
17 changes: 9 additions & 8 deletions spec/jekyll-feed_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -355,7 +356,7 @@
expect(news_feed).to match '<title type="html">My awesome site | News</title>'
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
Expand All @@ -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"
Expand All @@ -386,7 +387,7 @@
expect(news_feed).to match '<title type="html">My awesome site | News</title>'
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
Expand All @@ -411,7 +412,7 @@
expect(collection_feed).to match '<title type="html">My awesome site | Collection</title>'
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
Expand Down Expand Up @@ -439,7 +440,7 @@
expect(news_feed).to match '<title type="html">My awesome site | Collection | News</title>'
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
Expand Down

0 comments on commit 62b11b5

Please sign in to comment.