From 73926c55b90786cd3396b20d28bf67025e44db89 Mon Sep 17 00:00:00 2001 From: JoenioCosta Date: Fri, 2 May 2008 19:02:44 +0000 Subject: [PATCH] ActionItem345: remove term 'Category:' from product info's --- app/views/search/_product.rhtml | 5 ++--- test/functional/search_controller_test.rb | 9 +++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/views/search/_product.rhtml b/app/views/search/_product.rhtml index 79f6ab7..6151bad 100644 --- a/app/views/search/_product.rhtml +++ b/app/views/search/_product.rhtml @@ -2,8 +2,7 @@
  • <%= link_to_product product, :class => 'product-pic', :style => 'background-image:url(%s)' % - ( product.image ? product.image.public_filename(:minor) : - '/images/icons-app/product-default-pic-minor.png' ) %> + ( product.image ? product.image.public_filename(:minor) : '/images/icons-app/product-default-pic-minor.png' ) %> <%= link_to_product product %> @@ -12,6 +11,6 @@ <% if product.enterprise %>
  • <%= _('Suplier: %s') % link_to_homepage(product.enterprise.name, product.enterprise.identifier) %>
  • <% end %> -
  • <%= _('Category: %s') % link_to_category(product.product_category) %>
  • +
  • <%= link_to_category(product.product_category) %>
  • diff --git a/test/functional/search_controller_test.rb b/test/functional/search_controller_test.rb index 5af467e..6b8a5a9 100644 --- a/test/functional/search_controller_test.rb +++ b/test/functional/search_controller_test.rb @@ -748,4 +748,13 @@ class SearchControllerTest < Test::Unit::TestCase assert_not_includes assigns(:results)[:comments], comment4 end + should 'not show term "Category:" before product category' do + Profile.delete_all + ent = Enterprise.create!(:name => 'teste1', :identifier => 'teste1') + prod1 = ent.products.create!(:name => 'a beautiful product') + prod2 = ent.products.create!(:name => 'another beautiful product') + get :assets, :asset => 'products' + assert_no_match /Category:/, @response.body + end + end -- libgit2 0.21.2