Commit 212236edb9eacfb4e43894544dee632d8ffc5a51

Authored by Antonio Terceiro
1 parent 7974767b

Fix unit tests

plugins/shopping_cart/test/unit/shopping_cart_plugin_test.rb
@@ -7,7 +7,6 @@ class ShoppingCartPluginTest < ActiveSupport::TestCase @@ -7,7 +7,6 @@ class ShoppingCartPluginTest < ActiveSupport::TestCase
7 @context = mock() 7 @context = mock()
8 @profile = mock() 8 @profile = mock()
9 @profile.stubs(:identifier).returns('random-user') 9 @profile.stubs(:identifier).returns('random-user')
10 - @context.stubs(:profile).returns(@profile)  
11 @shopping_cart.context = @context 10 @shopping_cart.context = @context
12 @shopping_cart.stubs(:profile).returns(@profile) 11 @shopping_cart.stubs(:profile).returns(@profile)
13 end 12 end
@@ -23,7 +22,8 @@ class ShoppingCartPluginTest < ActiveSupport::TestCase @@ -23,7 +22,8 @@ class ShoppingCartPluginTest < ActiveSupport::TestCase
23 product = fast_create(Product, :available => false) 22 product = fast_create(Product, :available => false)
24 enterprise = mock() 23 enterprise = mock()
25 enterprise.stubs(:shopping_cart).returns(true) 24 enterprise.stubs(:shopping_cart).returns(true)
  25 + product.stubs(:enterprise).returns(enterprise)
26 26
27 - assert_nil shopping_cart.add_to_cart_button(product, enterprise) 27 + assert_nil shopping_cart.add_to_cart_button(product)
28 end 28 end
29 end 29 end