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 @context = mock()
8 8 @profile = mock()
9 9 @profile.stubs(:identifier).returns('random-user')
10   - @context.stubs(:profile).returns(@profile)
11 10 @shopping_cart.context = @context
12 11 @shopping_cart.stubs(:profile).returns(@profile)
13 12 end
... ... @@ -23,7 +22,8 @@ class ShoppingCartPluginTest < ActiveSupport::TestCase
23 22 product = fast_create(Product, :available => false)
24 23 enterprise = mock()
25 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 28 end
29 29 end
... ...