From 812eb22200db7dc99d256d97f9c9899cd63f55da Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Thu, 13 Apr 2017 11:36:49 -0400 Subject: [PATCH] add test for front matter defaults --- spec/jekyll_seo_tag/drop_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/spec/jekyll_seo_tag/drop_spec.rb b/spec/jekyll_seo_tag/drop_spec.rb index d61e7b2..83661f5 100644 --- a/spec/jekyll_seo_tag/drop_spec.rb +++ b/spec/jekyll_seo_tag/drop_spec.rb @@ -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" } }