Fix locale specs that use the fallback locale (#360)

Merge pull request 360
This commit is contained in:
Liam Cooke 2020-01-31 20:39:38 +11:00 committed by GitHub
parent 2d058584e4
commit 6f35c9c05b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -660,10 +660,10 @@ RSpec.describe Jekyll::SeoTag do
end
context "with site.lang" do
let(:site) { make_site("lang" => "en_US") }
let(:site) { make_site("lang" => "de_DE") }
it "uses site.lang if page.lang is not present" do
expected = %r!<meta property="og:locale" content="en_US" />!
expected = %r!<meta property="og:locale" content="de_DE" />!
expect(output).to match(expected)
end
@ -678,10 +678,10 @@ RSpec.describe Jekyll::SeoTag do
end
context "with site.lang hyphenated" do
let(:site) { make_site("lang" => "en-US") }
let(:site) { make_site("lang" => "en-AU") }
it "coerces hyphen to underscore" do
expected = %r!<meta property="og:locale" content="en_US" />!
expected = %r!<meta property="og:locale" content="en_AU" />!
expect(output).to match(expected)
end
end