Sha256: c267e37a3b8b48f683f8a266f831faf4cdecd44d229a2eb025bd5aedeeccc1c2

Contents?: true

Size: 475 Bytes

Versions: 89

Compression:

Stored size: 475 Bytes

Contents

FactoryBot.define do
  sequence(:store_credits_order_number) { |n| "R1000#{n}" }

  factory :store_credit, class: Spree::StoreCredit do
    user
    created_by { create(:user) }
    category { create(:store_credit_category) }
    amount { 150.00 }
    currency { 'USD' }
    credit_type { create(:primary_credit_type) }
  end

  factory :store_credits_order_without_user, class: Spree::Order do
    number { generate(:store_credits_order_number) }
    bill_address
  end
end

Version data entries

89 entries across 89 versions & 1 rubygems

Version Path
spree_core-4.0.9 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.1.15 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.2.7 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.2.6 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.2.5 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.1.14 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.0.8 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.2.4 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-3.7.14.1 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.2.3.1 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.1.13.1 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.0.7.1 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.2.3 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.2.2 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.2.1 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.0.7 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-3.7.14 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.2.0 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.2.0.rc5 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.2.0.rc4 lib/spree/testing_support/factories/store_credit_factory.rb