solidus_core 2.11.4 → 2.11.5
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of solidus_core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/models/spree/address.rb +28 -5
- data/app/models/spree/order_merger.rb +1 -1
- data/app/models/spree/payment.rb +10 -3
- data/app/models/spree/product.rb +8 -2
- data/app/models/spree/shipping_method.rb +1 -1
- data/app/models/spree/stock/availability_validator.rb +2 -2
- data/app/models/spree/stock/inventory_validator.rb +2 -2
- data/app/models/spree/taxon/active_storage_attachment.rb +1 -2
- data/app/models/spree/taxon/paperclip_attachment.rb +1 -0
- data/db/migrate/20210122110141_add_name_to_spree_addresses.rb +13 -0
- data/lib/generators/spree/dummy/templates/rails/test.rb +3 -0
- data/lib/spree/core.rb +0 -4
- data/lib/spree/core/engine.rb +6 -7
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/testing_support.rb +19 -28
- data/lib/spree/testing_support/dummy_app.rb +4 -2
- data/lib/spree/testing_support/dummy_app/mailer_previews/test_mailer_preview.rb +4 -0
- data/lib/spree/testing_support/factories.rb +8 -2
- data/lib/spree/testing_support/factories/address_factory.rb +6 -2
- data/lib/spree/testing_support/factories/adjustment_factory.rb +10 -2
- data/lib/spree/testing_support/factories/adjustment_reason_factory.rb +4 -2
- data/lib/spree/testing_support/factories/calculator_factory.rb +4 -2
- data/lib/spree/testing_support/factories/carton_factory.rb +7 -2
- data/lib/spree/testing_support/factories/country_factory.rb +4 -2
- data/lib/spree/testing_support/factories/credit_card_factory.rb +4 -2
- data/lib/spree/testing_support/factories/customer_return_factory.rb +8 -2
- data/lib/spree/testing_support/factories/image_factory.rb +4 -2
- data/lib/spree/testing_support/factories/inventory_unit_factory.rb +9 -2
- data/lib/spree/testing_support/factories/line_item_factory.rb +7 -2
- data/lib/spree/testing_support/factories/option_type_factory.rb +7 -2
- data/lib/spree/testing_support/factories/option_value_factory.rb +4 -2
- data/lib/spree/testing_support/factories/order_factory.rb +11 -2
- data/lib/spree/testing_support/factories/order_promotion_factory.rb +7 -2
- data/lib/spree/testing_support/factories/payment_factory.rb +9 -2
- data/lib/spree/testing_support/factories/payment_method_factory.rb +4 -2
- data/lib/spree/testing_support/factories/price_factory.rb +6 -2
- data/lib/spree/testing_support/factories/product_factory.rb +10 -2
- data/lib/spree/testing_support/factories/product_option_type_factory.rb +7 -2
- data/lib/spree/testing_support/factories/product_property_factory.rb +7 -2
- data/lib/spree/testing_support/factories/promotion_category_factory.rb +4 -2
- data/lib/spree/testing_support/factories/promotion_code_factory.rb +7 -2
- data/lib/spree/testing_support/factories/promotion_factory.rb +7 -2
- data/lib/spree/testing_support/factories/property_factory.rb +4 -2
- data/lib/spree/testing_support/factories/refund_factory.rb +7 -2
- data/lib/spree/testing_support/factories/refund_reason_factory.rb +4 -2
- data/lib/spree/testing_support/factories/reimbursement_factory.rb +6 -2
- data/lib/spree/testing_support/factories/reimbursement_type_factory.rb +4 -2
- data/lib/spree/testing_support/factories/return_authorization_factory.rb +8 -2
- data/lib/spree/testing_support/factories/return_item_factory.rb +8 -2
- data/lib/spree/testing_support/factories/return_reason_factory.rb +4 -2
- data/lib/spree/testing_support/factories/role_factory.rb +4 -2
- data/lib/spree/testing_support/factories/shipment_factory.rb +9 -2
- data/lib/spree/testing_support/factories/shipping_category_factory.rb +4 -2
- data/lib/spree/testing_support/factories/shipping_method_factory.rb +8 -2
- data/lib/spree/testing_support/factories/shipping_rate_factory.rb +7 -2
- data/lib/spree/testing_support/factories/state_factory.rb +7 -2
- data/lib/spree/testing_support/factories/stock_item_factory.rb +7 -2
- data/lib/spree/testing_support/factories/stock_location_factory.rb +8 -2
- data/lib/spree/testing_support/factories/stock_movement_factory.rb +6 -2
- data/lib/spree/testing_support/factories/stock_package_factory.rb +7 -2
- data/lib/spree/testing_support/factories/store_credit_category_factory.rb +4 -2
- data/lib/spree/testing_support/factories/store_credit_event_factory.rb +7 -2
- data/lib/spree/testing_support/factories/store_credit_factory.rb +8 -2
- data/lib/spree/testing_support/factories/store_credit_reason_factory.rb +4 -2
- data/lib/spree/testing_support/factories/store_credit_type_factory.rb +4 -2
- data/lib/spree/testing_support/factories/store_factory.rb +4 -2
- data/lib/spree/testing_support/factories/tax_category_factory.rb +7 -2
- data/lib/spree/testing_support/factories/tax_rate_factory.rb +8 -2
- data/lib/spree/testing_support/factories/taxon_factory.rb +6 -2
- data/lib/spree/testing_support/factories/taxonomy_factory.rb +4 -2
- data/lib/spree/testing_support/factories/user_factory.rb +8 -2
- data/lib/spree/testing_support/factories/variant_factory.rb +9 -2
- data/lib/spree/testing_support/factories/variant_property_rule_condition_factory.rb +7 -2
- data/lib/spree/testing_support/factories/variant_property_rule_factory.rb +8 -2
- data/lib/spree/testing_support/factories/variant_property_rule_value_factory.rb +7 -2
- data/lib/spree/testing_support/factories/zone_factory.rb +7 -2
- data/lib/spree/testing_support/factory_bot.rb +68 -0
- data/lib/spree/testing_support/order_walkthrough.rb +9 -9
- data/lib/spree/testing_support/sequences.rb +4 -1
- data/lib/tasks/migrations/migrate_address_names.rake +158 -0
- data/lib/tasks/migrations/migrate_default_billing_addresses_to_address_book.rake +38 -0
- data/lib/tasks/upgrade.rake +13 -0
- data/solidus_core.gemspec +23 -1
- metadata +30 -6
- data/lib/spree/awesome_nested_set_override.rb +0 -44
@@ -1,7 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
end
|
5
7
|
|
6
8
|
FactoryBot.define do
|
7
9
|
factory :credit_card, class: 'Spree::CreditCard' do
|
@@ -1,7 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/stock_location_factory'
|
8
|
+
require 'spree/testing_support/factories/order_factory'
|
9
|
+
require 'spree/testing_support/factories/return_item_factory'
|
10
|
+
end
|
5
11
|
|
6
12
|
FactoryBot.define do
|
7
13
|
factory :customer_return, class: 'Spree::CustomerReturn' do
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
end
|
5
7
|
|
6
8
|
FactoryBot.define do
|
7
9
|
factory :image, class: 'Spree::Image' do
|
@@ -1,7 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/line_item_factory'
|
8
|
+
require 'spree/testing_support/factories/variant_factory'
|
9
|
+
require 'spree/testing_support/factories/order_factory'
|
10
|
+
require 'spree/testing_support/factories/shipment_factory'
|
11
|
+
end
|
5
12
|
|
6
13
|
FactoryBot.define do
|
7
14
|
factory :inventory_unit, class: 'Spree::InventoryUnit' do
|
@@ -1,7 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/order_factory'
|
8
|
+
require 'spree/testing_support/factories/product_factory'
|
9
|
+
end
|
5
10
|
|
6
11
|
FactoryBot.define do
|
7
12
|
factory :line_item, class: 'Spree::LineItem' do
|
@@ -1,7 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/product_factory'
|
8
|
+
require 'spree/testing_support/factories/option_type_factory'
|
9
|
+
end
|
5
10
|
|
6
11
|
FactoryBot.define do
|
7
12
|
factory :option_type, class: 'Spree::OptionType' do
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
end
|
5
7
|
|
6
8
|
FactoryBot.define do
|
7
9
|
factory :option_value, class: 'Spree::OptionValue' do
|
@@ -1,7 +1,16 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/address_factory'
|
8
|
+
require 'spree/testing_support/factories/shipment_factory'
|
9
|
+
require 'spree/testing_support/factories/store_factory'
|
10
|
+
require 'spree/testing_support/factories/user_factory'
|
11
|
+
require 'spree/testing_support/factories/line_item_factory'
|
12
|
+
require 'spree/testing_support/factories/payment_factory'
|
13
|
+
end
|
5
14
|
|
6
15
|
FactoryBot.define do
|
7
16
|
factory :order, class: 'Spree::Order' do
|
@@ -1,7 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/order_factory'
|
8
|
+
require 'spree/testing_support/factories/promotion_factory'
|
9
|
+
end
|
5
10
|
|
6
11
|
FactoryBot.define do
|
7
12
|
factory :order_promotion, class: 'Spree::OrderPromotion' do
|
@@ -1,7 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/payment_method_factory'
|
8
|
+
require 'spree/testing_support/factories/credit_card_factory'
|
9
|
+
require 'spree/testing_support/factories/order_factory'
|
10
|
+
require 'spree/testing_support/factories/store_credit_factory'
|
11
|
+
end
|
5
12
|
|
6
13
|
FactoryBot.define do
|
7
14
|
factory :payment, aliases: [:credit_card_payment], class: 'Spree::Payment' do
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
end
|
5
7
|
|
6
8
|
FactoryBot.define do
|
7
9
|
factory :payment_method, aliases: [:credit_card_payment_method], class: 'Spree::PaymentMethod::BogusCreditCard' do
|
@@ -1,7 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/variant_factory'
|
8
|
+
end
|
5
9
|
|
6
10
|
FactoryBot.define do
|
7
11
|
factory :price, class: 'Spree::Price' do
|
@@ -1,7 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/sequences'
|
8
|
+
require 'spree/testing_support/factories/shipping_category_factory'
|
9
|
+
require 'spree/testing_support/factories/stock_location_factory'
|
10
|
+
require 'spree/testing_support/factories/tax_category_factory'
|
11
|
+
require 'spree/testing_support/factories/product_option_type_factory'
|
12
|
+
end
|
5
13
|
|
6
14
|
FactoryBot.define do
|
7
15
|
factory :base_product, class: 'Spree::Product' do
|
@@ -1,7 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/product_factory'
|
8
|
+
require 'spree/testing_support/factories/option_type_factory'
|
9
|
+
end
|
5
10
|
|
6
11
|
FactoryBot.define do
|
7
12
|
factory :product_option_type, class: 'Spree::ProductOptionType' do
|
@@ -1,7 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/product_factory'
|
8
|
+
require 'spree/testing_support/factories/property_factory'
|
9
|
+
end
|
5
10
|
|
6
11
|
FactoryBot.define do
|
7
12
|
factory :product_property, class: 'Spree::ProductProperty' do
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
end
|
5
7
|
|
6
8
|
FactoryBot.define do
|
7
9
|
factory :promotion_category, class: 'Spree::PromotionCategory' do
|
@@ -1,7 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/sequences'
|
8
|
+
require 'spree/testing_support/factories/promotion_factory'
|
9
|
+
end
|
5
10
|
|
6
11
|
FactoryBot.define do
|
7
12
|
factory :promotion_code, class: 'Spree::PromotionCode' do
|
@@ -1,7 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/promotion_code_factory'
|
8
|
+
require 'spree/testing_support/factories/variant_factory'
|
9
|
+
end
|
5
10
|
|
6
11
|
FactoryBot.define do
|
7
12
|
factory :promotion, class: 'Spree::Promotion' do
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
end
|
5
7
|
|
6
8
|
FactoryBot.define do
|
7
9
|
factory :property, class: 'Spree::Property' do
|
@@ -1,7 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/payment_factory'
|
8
|
+
require 'spree/testing_support/factories/refund_reason_factory'
|
9
|
+
end
|
5
10
|
|
6
11
|
FactoryBot.define do
|
7
12
|
sequence(:refund_transaction_id) { |n| "fake-refund-transaction-#{n}" }
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
end
|
5
7
|
|
6
8
|
FactoryBot.define do
|
7
9
|
factory :refund_reason, class: 'Spree::RefundReason' do
|
@@ -1,7 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/customer_return_factory'
|
8
|
+
end
|
5
9
|
|
6
10
|
FactoryBot.define do
|
7
11
|
factory :reimbursement, class: 'Spree::Reimbursement' do
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
end
|
5
7
|
|
6
8
|
FactoryBot.define do
|
7
9
|
factory :reimbursement_type, class: 'Spree::ReimbursementType' do
|
@@ -1,7 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/order_factory'
|
8
|
+
require 'spree/testing_support/factories/stock_location_factory'
|
9
|
+
require 'spree/testing_support/factories/return_reason_factory'
|
10
|
+
end
|
5
11
|
|
6
12
|
FactoryBot.define do
|
7
13
|
factory :return_authorization, class: 'Spree::ReturnAuthorization' do
|
@@ -1,7 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/inventory_unit_factory'
|
8
|
+
require 'spree/testing_support/factories/return_reason_factory'
|
9
|
+
require 'spree/testing_support/factories/return_authorization_factory'
|
10
|
+
end
|
5
11
|
|
6
12
|
FactoryBot.define do
|
7
13
|
factory :return_item, class: 'Spree::ReturnItem' do
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
end
|
5
7
|
|
6
8
|
FactoryBot.define do
|
7
9
|
factory :return_reason, class: 'Spree::ReturnReason' do
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
end
|
5
7
|
|
6
8
|
FactoryBot.define do
|
7
9
|
factory :role, class: 'Spree::Role' do
|
@@ -1,7 +1,14 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
|
7
|
+
require 'spree/testing_support/factories/order_factory'
|
8
|
+
require 'spree/testing_support/factories/stock_location_factory'
|
9
|
+
require 'spree/testing_support/factories/shipping_method_factory'
|
10
|
+
end
|
11
|
+
|
5
12
|
|
6
13
|
FactoryBot.define do
|
7
14
|
factory :shipment, class: 'Spree::Shipment' do
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'spree/testing_support'
|
4
|
-
Spree::TestingSupport.
|
3
|
+
require 'spree/testing_support/factory_bot'
|
4
|
+
Spree::TestingSupport::FactoryBot.when_cherry_picked do
|
5
|
+
Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
|
6
|
+
end
|
5
7
|
|
6
8
|
FactoryBot.define do
|
7
9
|
factory :shipping_category, class: 'Spree::ShippingCategory' do
|