Commit 45b0f5dae6028eb6e59843112437d5b3d970a950
1 parent
aaca62c7
Exists in
master
and in
29 other branches
Fixing tests
(ActionItem1996)
Showing
3 changed files
with
6 additions
and
1 deletions
Show diff stats
app/helpers/catalog_helper.rb
... | ... | @@ -5,8 +5,9 @@ include ManageProductsHelper |
5 | 5 | |
6 | 6 | def display_products_list(profile, products) |
7 | 7 | data = '' |
8 | + extra_content = [] | |
8 | 9 | products.each { |product| |
9 | - extra_content = @plugins.map(:catalog_item_extras, product).collect { |content| instance_eval(&content) } | |
10 | + extra_content = @plugins.map(:catalog_item_extras, product).collect { |content| instance_eval(&content) } if @plugins | |
10 | 11 | data << content_tag('li', |
11 | 12 | link_to_product(product, :class => 'product-pic', :style => 'background-image:url(%s)' % product.default_image(:portrait) ) + |
12 | 13 | content_tag('h3', link_to_product(product)) + | ... | ... |
test/functional/profile_controller_test.rb
... | ... | @@ -1164,6 +1164,8 @@ class ProfileControllerTest < Test::Unit::TestCase |
1164 | 1164 | tabs = [plugin1_tab, plugin2_tab] |
1165 | 1165 | plugins = mock() |
1166 | 1166 | plugins.stubs(:map).with(:profile_tabs).returns(tabs) |
1167 | + plugins.stubs(:enabled_plugins).returns([]) | |
1168 | + plugins.stubs(:map).with(:body_beginning).returns([]) | |
1167 | 1169 | Noosfero::Plugin::Manager.stubs(:new).returns(plugins) |
1168 | 1170 | |
1169 | 1171 | get :index, :profile => profile.identifier | ... | ... |
test/functional/profile_editor_controller_test.rb
... | ... | @@ -870,6 +870,8 @@ class ProfileEditorControllerTest < Test::Unit::TestCase |
870 | 870 | buttons = [plugin1_button, plugin2_button] |
871 | 871 | plugins = mock() |
872 | 872 | plugins.stubs(:map).with(:control_panel_buttons).returns(buttons) |
873 | + plugins.stubs(:enabled_plugins).returns([]) | |
874 | + plugins.stubs(:map).with(:body_beginning).returns([]) | |
873 | 875 | Noosfero::Plugin::Manager.stubs(:new).returns(plugins) |
874 | 876 | |
875 | 877 | get :index, :profile => profile.identifier | ... | ... |