Commit d8cedf7d850860ee837984e9de189694113304c6
1 parent
415d3eec
Exists in
master
and in
28 other branches
Making shopping cart disabled on the enterprise by default
Showing
2 changed files
with
6 additions
and
4 deletions
Show diff stats
plugins/shopping_cart/lib/shopping_cart_plugin.rb
| @@ -12,10 +12,6 @@ class ShoppingCartPlugin < Noosfero::Plugin | @@ -12,10 +12,6 @@ class ShoppingCartPlugin < Noosfero::Plugin | ||
| 12 | _("A shopping basket feature for enterprises") | 12 | _("A shopping basket feature for enterprises") |
| 13 | end | 13 | end |
| 14 | 14 | ||
| 15 | - def enabled_default_setting | ||
| 16 | - true | ||
| 17 | - end | ||
| 18 | - | ||
| 19 | def delivery_default_setting | 15 | def delivery_default_setting |
| 20 | false | 16 | false |
| 21 | end | 17 | end |
plugins/shopping_cart/test/unit/shopping_cart_plugin_test.rb
| @@ -26,4 +26,10 @@ class ShoppingCartPluginTest < ActiveSupport::TestCase | @@ -26,4 +26,10 @@ class ShoppingCartPluginTest < ActiveSupport::TestCase | ||
| 26 | 26 | ||
| 27 | assert_nil shopping_cart.add_to_cart_button(product) | 27 | assert_nil shopping_cart.add_to_cart_button(product) |
| 28 | end | 28 | end |
| 29 | + | ||
| 30 | + should 'be disabled by default on the enterprise' do | ||
| 31 | + enterprise = fast_create(Enterprise) | ||
| 32 | + settings = Noosfero::Plugin::Settings.new(enterprise, ShoppingCartPlugin) | ||
| 33 | + assert !settings.enabled | ||
| 34 | + end | ||
| 29 | end | 35 | end |