From 1c8a49615a1047faf317cb2de1164730327c6a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 19 Jun 2019 17:43:33 +0200 Subject: [PATCH] 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. --- spec/system/social_media_meta_tags_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/system/social_media_meta_tags_spec.rb b/spec/system/social_media_meta_tags_spec.rb index 08470ee7e..f114c204f 100644 --- a/spec/system/social_media_meta_tags_spec.rb +++ b/spec/system/social_media_meta_tags_spec.rb @@ -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