Sha256: 6c937fddc2e990b7d35219df5ab9be104f47c6853152308b4a76ea54a3c36ccb

Contents?: true

Size: 751 Bytes

Versions: 22

Compression:

Stored size: 751 Bytes

Contents

FactoryBot.define do
  factory :return_authorization, class: Spree::ReturnAuthorization do
    association(:order, factory: :shipped_order)
    association(:stock_location, factory: :stock_location)
    association(:reason, factory: :return_authorization_reason)

    memo { 'Items were broken' }
  end

  factory :new_return_authorization, class: Spree::ReturnAuthorization do
    association(:order, factory: :shipped_order)
    association(:stock_location, factory: :stock_location)
    association(:reason, factory: :return_authorization_reason)
  end

  factory :return_authorization_reason, class: Spree::ReturnAuthorizationReason do
    sequence(:name) { |n| "Defect #{n}" }
    active          { true }
    mutable         { false }
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
spree_core-4.5.1 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.5.0 lib/spree/testing_support/factories/return_authorization_factory.rb