Fix references to Capybara.app_host
We were manually setting `http://www.example.com`. However, Capybara now uses `http://127.0.0.1`. While we could change the code to use `127.0.0.1`, I think directly using `Capybara.app_host` makes it easier to realize what the code is doing. And, particularly, now it's clear the host has nothing to do with our `Setting["url"]`, which by default points to `www.example.com` as well.
This commit is contained in:
@@ -29,14 +29,14 @@ describe "Social media meta tags" do
|
||||
expect(page).to have_meta "twitter:title", with: meta_title
|
||||
expect(page).to have_meta "twitter:description", with: meta_description
|
||||
expect(page).to have_meta "twitter:image",
|
||||
with: "http://www.example.com/social_media_icon_twitter.png"
|
||||
with: "#{Capybara.app_host}/social_media_icon_twitter.png"
|
||||
|
||||
expect(page).to have_property "og:title", with: meta_title
|
||||
expect(page).to have_property "article:publisher", with: url
|
||||
expect(page).to have_property "article:author", with: "https://www.facebook.com/" +
|
||||
facebook_handle
|
||||
expect(page).to have_property "og:url", with: "http://www.example.com/"
|
||||
expect(page).to have_property "og:image", with: "http://www.example.com/social_media_icon.png"
|
||||
expect(page).to have_property "og:url", with: "#{Capybara.app_host}/"
|
||||
expect(page).to have_property "og:image", with: "#{Capybara.app_host}/social_media_icon.png"
|
||||
expect(page).to have_property "og:site_name", with: org_name
|
||||
expect(page).to have_property "og:description", with: meta_description
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user