Sha256: b20ea3066ce1664271055d4143192bf6050d2b3f865c07b09f276baf1be93af1

Contents?: true

Size: 542 Bytes

Versions: 7

Compression:

Stored size: 542 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

7 entries across 7 versions & 1 rubygems

Version Path
solidus_core-1.2.3 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-1.2.2 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-1.2.1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-1.2.0 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-1.2.0.rc2 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-1.2.0.rc1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-1.2.0.beta1 lib/spree/testing_support/factories/refund_factory.rb