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.0.9 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.1.15 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.2.7 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.3.3 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.4.1 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.2.6 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.3.2 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.4.0 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.4.0.rc2 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.3.1 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.4.0.rc1 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.3.0 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.3.0.rc3 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.3.0.rc2 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.3.0.rc1 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.2.5 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.1.14 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.0.8 lib/spree/testing_support/factories/refund_factory.rb
spree_core-4.2.4 lib/spree/testing_support/factories/refund_factory.rb
spree_core-3.7.14.1 lib/spree/testing_support/factories/refund_factory.rb