Sha256: 99903ca04ec890bd6d78bb18ee66d09c6815c342c5409d65d8c6681c649cfcec

Contents?: true

Size: 543 Bytes

Versions: 32

Compression:

Stored size: 543 Bytes

Contents

require 'spree/testing_support/factories/payment_factory'
require 'spree/testing_support/factories/refund_reason_factory'

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

  factory :refund, class: Spree::Refund do
    transient do
      payment_amount 100
    end

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

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
solidus_core-2.3.1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.2.2 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.1.1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.0.3 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-1.4.2 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-1.3.2 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.3.0 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.3.0.rc3 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.3.0.rc2 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.3.0.rc1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.3.0.beta1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.0.2 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-1.4.1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.2.1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.2.0 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.2.0.rc1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.2.0.beta1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.1.0 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.1.0.rc1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-2.0.1 lib/spree/testing_support/factories/refund_factory.rb