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