mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-05 07:19:14 +00:00
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.
11 lines
234 B
Ruby
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
|