From 59b20c7bf95a84d8031fe4ae040b5953f5cbaeb5 Mon Sep 17 00:00:00 2001 From: Aaron Gustafson Date: Fri, 31 Mar 2017 14:26:58 -0400 Subject: [PATCH] Added test --- spec/jekyll_seo_tag_spec.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/spec/jekyll_seo_tag_spec.rb b/spec/jekyll_seo_tag_spec.rb index 1937ab9..700f524 100755 --- a/spec/jekyll_seo_tag_spec.rb +++ b/spec/jekyll_seo_tag_spec.rb @@ -581,4 +581,24 @@ EOS end end end + + context "with locale" do + let(:site) { make_site("locale" => "en_US") } + + it "uses site.locale if page.locale is not present" do + expected = %r!! + expect(output).to match(expected) + end + + context "with page.locale" do + let(:site) { make_site("locale" => "en_US") } + let(:page) { make_page("locale" => "en_UK") } + + it "uses page.locale if both site.locale and page.locale are present" do + expected = %r!! + expect(output).to match(expected) + end + end + end + end