Sha256: a9d1cea4de99115a8a9b5adf16563730c8c0faf4afaef740c55f171483e770d4

Contents?: true

Size: 460 Bytes

Versions: 24

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

FactoryBot.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

24 entries across 24 versions & 1 rubygems

Version Path
solidus_core-4.4.2 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.4.1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.4.0 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.3.4 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.2.4 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.1.5 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.3.3 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.3.2 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.1.4 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.3.1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.3.0 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.2.3 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.1.3 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.0.4 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.0.3 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.1.2 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.2.2 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.2.1 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.2.0 lib/spree/testing_support/factories/refund_factory.rb
solidus_core-4.1.1 lib/spree/testing_support/factories/refund_factory.rb