update canoncial URL expectation

This commit is contained in:
Ben Balter 2017-05-25 09:34:18 -04:00
parent bf6b14b167
commit 245abc6032
No known key found for this signature in database
GPG Key ID: DBB67C246AD356C4
1 changed files with 5 additions and 5 deletions

View File

@ -626,21 +626,21 @@ RSpec.describe Jekyll::SeoTag::Drop do
end
context "canonical url" do
let(:config) { { :url => "http://example.com" } }
let(:config) { { :url => "http://example.com" } }
context "when canonical url is specified for a page" do
let(:canonical_url) { "https://github.com/jekyll/jekyll-seo-tag/" }
let(:page_meta) { { "title" => "page title", "canonical_url" => canonical_url } }
it "uses specified canonical url" do
expect(subject.canonical_url).to eq(canonical_url)
end
end
context "when canonical url is not specified for a page" do
it "uses site specific canonical url" do
expect(subject.canonical_url).to eq("http://example.com/page-title.html")
expect(subject.canonical_url).to eq("http://example.com/page.html")
end
end
end