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.10.1 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.10.0 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.9.0 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.8.3 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.8.2 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.7.3 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.6.6 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.5.5 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.5.4 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.6.5 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.7.2 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.7.1 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.6.4 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.7.0 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.6.3 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.6.2 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.6.1 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.6.0 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.5.3 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.5.2 lib/spree/testing_support/factories/return_authorization_factory.rb