Commit c6642d60d1c11ea9434d4bc12d56f363967aa716

Authored by Daniela Feitosa
1 parent 95a37ccc

Added test to verify controller on display_profile_info

(ActionItem1907)
Showing 1 changed file with 8 additions and 0 deletions   Show diff stats
test/unit/search_helper_test.rb
... ... @@ -55,6 +55,14 @@ class SearchHelperTest < Test::Unit::TestCase
55 55 assert_tag_in_string result, :tag => 'a', :attributes => {:href => /:id=>#{product2.id}/}, :content => product2.name
56 56 end
57 57  
  58 + should 'link to manage_products controller on display_profile_info' do
  59 + enterprise = fast_create(Enterprise)
  60 + product = fast_create(Product, :enterprise_id => enterprise.id)
  61 + result = display_profile_info(enterprise)
  62 + assert_tag_in_string result, :tag => 'a', :attributes => {:href => /:controller=>\"manage_products\"/}, :content => product.name
  63 + assert_no_tag_in_string result, :tag => 'a', :attributes => {:href => /:id=>\"catalog\"/}, :content => product.name
  64 + end
  65 +
58 66 protected
59 67 include NoosferoTestHelper
60 68  
... ...