Sha256: 3008645cf461fa16ee29a5ce629b965bf5e32230a40ef9fcd79092168320920a

Contents?: true

Size: 528 Bytes

Versions: 26

Compression:

Stored size: 528 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) }
    store { Spree::Store.default || create(:store) }
  end

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

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
spree_core-4.10.1 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.10.0 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.9.0 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.8.3 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.8.2 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.7.3 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.6.6 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.5.5 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.4.1 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.5.4 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.6.5 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.7.2 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.7.1 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.6.4 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.7.0 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.6.3 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.6.2 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.6.1 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.6.0 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.5.3 lib/spree/testing_support/factories/store_credit_factory.rb