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-4.10.1 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.10.0 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.9.0 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.8.3 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.8.2 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.7.3 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.6.6 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.5.5 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.0.9 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.1.15 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.2.7 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.3.3 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.4.1 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.5.4 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.6.5 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.7.2 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.7.1 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.6.4 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.7.0 lib/spree/testing_support/factories/calculator_factory.rb
spree_core-4.6.3 lib/spree/testing_support/factories/calculator_factory.rb