From c6642d60d1c11ea9434d4bc12d56f363967aa716 Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Fri, 4 Mar 2011 14:12:19 -0300 Subject: [PATCH] Added test to verify controller on display_profile_info --- test/unit/search_helper_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+), 0 deletions(-) diff --git a/test/unit/search_helper_test.rb b/test/unit/search_helper_test.rb index 8840a83..4ac311e 100644 --- a/test/unit/search_helper_test.rb +++ b/test/unit/search_helper_test.rb @@ -55,6 +55,14 @@ class SearchHelperTest < Test::Unit::TestCase assert_tag_in_string result, :tag => 'a', :attributes => {:href => /:id=>#{product2.id}/}, :content => product2.name end + should 'link to manage_products controller on display_profile_info' do + enterprise = fast_create(Enterprise) + product = fast_create(Product, :enterprise_id => enterprise.id) + result = display_profile_info(enterprise) + assert_tag_in_string result, :tag => 'a', :attributes => {:href => /:controller=>\"manage_products\"/}, :content => product.name + assert_no_tag_in_string result, :tag => 'a', :attributes => {:href => /:id=>\"catalog\"/}, :content => product.name + end + protected include NoosferoTestHelper -- libgit2 0.21.2