Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use categories in post #249

Merged
merged 4 commits into from
Sep 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be an [Array]?

Copy link
Member

@DirtyF DirtyF Oct 23, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

---

March the fourth!
16 changes: 8 additions & 8 deletions spec/jekyll-feed_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
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 @@ -240,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 @@ -345,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 @@ -356,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 @@ -376,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 @@ -387,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 @@ -412,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 @@ -440,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