Sha256: f2e5fc5a6d2df1928af65e0f08b146cacf91d290c118a63557d6c17dc4214442

Contents?: true

Size: 504 Bytes

Versions: 7

Compression:

Stored size: 504 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 { 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

7 entries across 7 versions & 1 rubygems

Version Path
spree_core-4.3.3 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.3.2 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.3.1 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.3.0 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.3.0.rc3 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.3.0.rc2 lib/spree/testing_support/factories/store_credit_factory.rb
spree_core-4.3.0.rc1 lib/spree/testing_support/factories/store_credit_factory.rb