From 45b0f5dae6028eb6e59843112437d5b3d970a950 Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Mon, 9 May 2011 13:21:32 -0300 Subject: [PATCH] Fixing tests --- app/helpers/catalog_helper.rb | 3 ++- test/functional/profile_controller_test.rb | 2 ++ test/functional/profile_editor_controller_test.rb | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/helpers/catalog_helper.rb b/app/helpers/catalog_helper.rb index 5f550e9..aa2ca7b 100644 --- a/app/helpers/catalog_helper.rb +++ b/app/helpers/catalog_helper.rb @@ -5,8 +5,9 @@ include ManageProductsHelper def display_products_list(profile, products) data = '' + extra_content = [] products.each { |product| - extra_content = @plugins.map(:catalog_item_extras, product).collect { |content| instance_eval(&content) } + extra_content = @plugins.map(:catalog_item_extras, product).collect { |content| instance_eval(&content) } if @plugins data << content_tag('li', link_to_product(product, :class => 'product-pic', :style => 'background-image:url(%s)' % product.default_image(:portrait) ) + content_tag('h3', link_to_product(product)) + diff --git a/test/functional/profile_controller_test.rb b/test/functional/profile_controller_test.rb index d0ef9d9..e462398 100644 --- a/test/functional/profile_controller_test.rb +++ b/test/functional/profile_controller_test.rb @@ -1164,6 +1164,8 @@ class ProfileControllerTest < Test::Unit::TestCase tabs = [plugin1_tab, plugin2_tab] plugins = mock() plugins.stubs(:map).with(:profile_tabs).returns(tabs) + plugins.stubs(:enabled_plugins).returns([]) + plugins.stubs(:map).with(:body_beginning).returns([]) Noosfero::Plugin::Manager.stubs(:new).returns(plugins) get :index, :profile => profile.identifier diff --git a/test/functional/profile_editor_controller_test.rb b/test/functional/profile_editor_controller_test.rb index 31411a3..4b4f67d 100644 --- a/test/functional/profile_editor_controller_test.rb +++ b/test/functional/profile_editor_controller_test.rb @@ -870,6 +870,8 @@ class ProfileEditorControllerTest < Test::Unit::TestCase buttons = [plugin1_button, plugin2_button] plugins = mock() plugins.stubs(:map).with(:control_panel_buttons).returns(buttons) + plugins.stubs(:enabled_plugins).returns([]) + plugins.stubs(:map).with(:body_beginning).returns([]) Noosfero::Plugin::Manager.stubs(:new).returns(plugins) get :index, :profile => profile.identifier -- libgit2 0.21.2