Sha256: d6b8a56b597d4571c7f6c0822ec8a1aabbd585817373371a230e80e12b8c3765

Contents?: true

Size: 752 Bytes

Versions: 80

Compression:

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

80 entries across 80 versions & 1 rubygems

Version Path
spree_core-4.0.9 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.1.15 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.2.7 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.3.3 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.4.1 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.2.6 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.3.2 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.4.0 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.4.0.rc2 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.3.1 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.4.0.rc1 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.3.0 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.3.0.rc3 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.3.0.rc2 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.3.0.rc1 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.2.5 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.1.14 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.0.8 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-4.2.4 lib/spree/testing_support/factories/return_authorization_factory.rb
spree_core-3.7.14.1 lib/spree/testing_support/factories/return_authorization_factory.rb