Commit 212236edb9eacfb4e43894544dee632d8ffc5a51
1 parent
7974767b
Exists in
master
and in
29 other branches
Fix unit tests
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
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 | ... | ... |