Files
openfoodnetwork/spec/factories/tax_rate_factory.rb
Matt-Yorkley 0d5d4aca11 Update tax_rate_factory
The amount is a decimal, so `0.1` here is actually a 10% tax rate. `100` is ridiculous (10000% tax).

Also, the factory fails without a calculator, and it should explicitly be a DefaultTax calculator or it will not be correct.
2021-04-04 19:19:06 +01:00

11 lines
234 B
Ruby

# frozen_string_literal: true
FactoryBot.define do
factory :tax_rate, class: Spree::TaxRate do
zone
amount { 0.1 }
tax_category
association(:calculator, factory: :default_tax_calculator, strategy: :build)
end
end