add test for front matter defaults

This commit is contained in:
Ben Balter 2017-04-13 11:36:49 -04:00
parent f048342e22
commit 812eb22200
No known key found for this signature in database
GPG Key ID: DBB67C246AD356C4
1 changed files with 17 additions and 0 deletions

View File

@ -206,6 +206,23 @@ RSpec.describe Jekyll::SeoTag::Drop do
end
end
context "with author as a front matter default" do
let(:config) do
{
"defaults" => [
{
"scope" => { "path" => "" },
"values" => { "author" => "front matter default" },
},
],
}
end
it "uses the author from the front matter default" do
expect(subject.author["name"]).to eql("front matter default")
end
end
context "twitter" do
let(:page_meta) { { "author" => "author" } }