Sha256: 1654db6867fd378509796da767a14c06166493ee037812106afdc8db283e6736

Contents?: true

Size: 460 Bytes

Versions: 18

Compression:

Stored size: 460 Bytes

Contents

FactoryGirl.define do
  factory :tax_category, :class => Spree::TaxCategory do
    name { "TaxCategory - #{rand(999999)}" }
    description { Faker::Lorem.sentence }
  end

  factory :tax_category_with_rates, :parent => :tax_category do
    after_create do |tax_category|
      tax_category.tax_rates.create!(:amount => 0.05, :calculator => Spree::Calculator::DefaultTax.new,
                                     :zone => Spree::Zone.global)
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
spree_core-1.0.7 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.1.3 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.0.6 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.1.2 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.1.2.rc1 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.1.1 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.1.0 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.0.4 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.1.0.rc2 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.1.0.rc1 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.0.3 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.0.2 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.0.1 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.0.0 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.0.0.rc4 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.0.0.rc3 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.0.0.rc2 lib/spree/core/testing_support/factories/tax_category_factory.rb
spree_core-1.0.0.rc1 lib/spree/core/testing_support/factories/tax_category_factory.rb