Merge pull request #2812 from luisramos0/2-0-adjust-enterprise-fees-spec-fix

[Spree Upgrade] Fix enterprise fees specs in adjustment_spec - tax_rate
This commit is contained in:
Pau Pérez Fabregat
2018-10-16 18:02:21 +02:00
committed by GitHub
2 changed files with 10 additions and 12 deletions

View File

@@ -25,9 +25,8 @@ module Spree
# LineItems or Orders, so we mock out a line item here to fit the interface
# that our calculator (usually DefaultTax) expects.
def compute_tax(amount)
product = OpenStruct.new tax_category: tax_category
line_item = LineItem.new quantity: 1
line_item.define_singleton_method(:product) { product }
line_item.tax_category = tax_category
line_item.define_singleton_method(:price) { amount }
# Tax on adjustments (represented by the included_tax field) is always inclusive of