Sha256: d057c2e1850458d368bd91dedf843960da1018213a0c32b6508b99ca58b08ac0

Contents?: true

Size: 641 Bytes

Versions: 80

Compression:

Stored size: 641 Bytes

Contents

FactoryBot.define do
  sequence(:refund_transaction_id) { |n| "fake-refund-transaction-#{n}" }

  factory :refund, class: Spree::Refund do
    amount         { 100.00 }
    transaction_id { generate(:refund_transaction_id) }
    association(:payment, state: 'completed')
    association(:reason, factory: :refund_reason)
  end

  factory :default_refund_reason, class: Spree::RefundReason do
    name    { 'Return processing' }
    active  { true }
    mutable { false }
  end

  factory :refund_reason, class: Spree::RefundReason do
    sequence(:name) { |n| "Refund for return ##{n}" }
    active  { true }
    mutable { false }
  end
end

Version data entries

80 entries across 80 versions & 1 rubygems

Version Path
spree_core-4.2.3.1 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.1.13.1 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.0.7.1 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.2.3 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.2.2 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.2.1 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.0.7 lib/spree/testing_support/factories/refund_factory.rb
spree_core-3.7.14 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.2.0 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.2.0.rc5 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.2.0.rc4 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.2.0.rc3 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.1.13 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.0.6 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.2.0.rc2 lib/spree/testing_support/factories/refund_factory.rb
spree_core-3.7.13 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.0.5 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.1.12 lib/spree/testing_support/factories/refund_factory.rb
spree_core-3.7.12 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.2.0.rc1 lib/spree/testing_support/factories/refund_factory.rb