From 9d2c0d6d553d1096880d28c62712bee049110b49 Mon Sep 17 00:00:00 2001 From: Marta Wyszynska Date: Fri, 24 Jun 2016 11:10:31 +0200 Subject: [PATCH] use `_path' instead of `_url' on `products' partial --- frontend/app/views/spree/shared/_products.html.erb | 2 +- frontend/spec/features/products_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/app/views/spree/shared/_products.html.erb b/frontend/app/views/spree/shared/_products.html.erb index cf3018ef4bc..bb95b503af5 100644 --- a/frontend/app/views/spree/shared/_products.html.erb +++ b/frontend/app/views/spree/shared/_products.html.erb @@ -19,7 +19,7 @@ <% if products.any? %>
<% products.each do |product| %> - <% url = spree.product_url(product, taxon_id: @taxon.try(:id)) %> + <% url = spree.product_path(product, taxon_id: @taxon.try(:id)) %>
<% cache(@taxon.present? ? [I18n.locale, current_currency, @taxon, product] : cache_key_for_product(product)) do %> diff --git a/frontend/spec/features/products_spec.rb b/frontend/spec/features/products_spec.rb index 80d744145fb..d27ddae970f 100644 --- a/frontend/spec/features/products_spec.rb +++ b/frontend/spec/features/products_spec.rb @@ -33,7 +33,7 @@ end it "correctly displays the product url via microdata" do - expect(ringer.properties["url"]).to eq ["http://www.example.com/products/ruby-on-rails-ringer-t-shirt"] + expect(ringer.properties["url"]).to eq ["/products/ruby-on-rails-ringer-t-shirt"] end end