cirandas.net

ref: master

plugins/shopping_cart/features/step_definitions/shopping_cart_steps.rb


1
2
3
4
5
6
7
Given /^the shopping basket is (enabled|disabled) on "([^""]*)"$/ do |status, name|
  status = status == 'enabled'
  enterprise = Enterprise.find_by(name: name) || Enterprise[name]
  settings = enterprise.shopping_cart_settings({:enabled => status})
  settings.save!
end