diff --git a/app/views/crops/show.html.haml b/app/views/crops/show.html.haml index e0408d991..eb09ece6e 100644 --- a/app/views/crops/show.html.haml +++ b/app/views/crops/show.html.haml @@ -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 diff --git a/spec/features/crops/crop_detail_page_spec.rb b/spec/features/crops/crop_detail_page_spec.rb index b14006d7c..09dd12c2f 100644 --- a/spec/features/crops/crop_detail_page_spec.rb +++ b/spec/features/crops/crop_detail_page_spec.rb @@ -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