#1038 Add links to OpenFarm

This commit is contained in:
Daniel O'Connor
2016-09-14 14:57:08 +09:30
parent 277325d58c
commit 36c64bd8dc
2 changed files with 7 additions and 0 deletions

View File

@@ -92,6 +92,8 @@
%h4 Learn more about #{ @crop.name.pluralize }
%ul
%li= link_to 'Wikipedia (English)', @crop.en_wikipedia_url, target: "_blank", rel: "noopener noreferrer"
%li
= link_to "OpenFarm - Growing guide", "https://openfarm.cc/en/crops/#{URI.escape @crop.name}", target: "_blank", rel: "noopener noreferrer"
%li
= link_to "Gardenate - Planting reminders", "http://www.gardenate.com/plant/#{URI.escape @crop.name}", target: "_blank", rel: "noopener noreferrer"
- if current_member && current_member.location

View File

@@ -135,6 +135,11 @@ feature "crop detail page", js: true do
expect(page).to have_content "Learn more about #{ crop.name }"
expect(page).to have_link "Wikipedia (English)", href: crop.en_wikipedia_url
end
scenario "has a link to OpenFarm" do
expect(page).to have_link "OpenFarm - Growing guide", href: "https://openfarm.cc/en/crops/#{URI.escape crop.name}"
end
scenario "has a link to gardenate" do
expect(page).to have_link "Gardenate - Planting reminders", href: "http://www.gardenate.com/plant/#{URI.escape crop.name}"
end