Sha256: bcca30f61bbdda2334030b208e0e56534a3018c5bb573e64d46e05ea2e1e93f4

Contents?: true

Size: 666 Bytes

Versions: 122

Compression:

Stored size: 666 Bytes

Contents

FactoryBot.define do
  factory :calculator, class: Spree::Calculator::FlatRate do
    after(:create) { |c| c.set_preference(:amount, 10.0) }
  end

  factory :no_amount_calculator, class: Spree::Calculator::FlatRate do
    after(:create) { |c| c.set_preference(:amount, 0) }
  end

  factory :default_tax_calculator, class: Spree::Calculator::DefaultTax do
  end

  factory :shipping_calculator, class: Spree::Calculator::Shipping::FlatRate do
    after(:create) { |c| c.set_preference(:amount, 10.0) }
  end

  factory :shipping_no_amount_calculator, class: Spree::Calculator::Shipping::FlatRate do
    after(:create) { |c| c.set_preference(:amount, 0) }
  end
end

Version data entries

122 entries across 122 versions & 1 rubygems

Version Path
spree_core-3.4.3 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-3.4.2 lib/spree/testing_support/factories/calculator_factory.rb