solidus_core 2.10.0.beta1 → 2.10.0
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/helpers/spree/base_helper.rb +4 -4
- data/app/helpers/spree/products_helper.rb +2 -1
- data/app/jobs/spree/promotion_code_batch_job.rb +2 -2
- data/app/models/concerns/spree/user_methods.rb +2 -2
- data/app/models/spree/address.rb +11 -15
- data/app/models/spree/adjustment.rb +11 -0
- data/app/models/spree/calculator/price_sack.rb +1 -1
- data/app/models/spree/calculator/shipping/flexi_rate.rb +2 -2
- data/app/models/spree/calculator/tiered_flat_rate.rb +5 -5
- data/app/models/spree/calculator/tiered_percent.rb +6 -6
- data/app/models/spree/carton.rb +1 -1
- data/app/models/spree/credit_card.rb +2 -2
- data/app/models/spree/inventory_unit.rb +1 -19
- data/app/models/spree/line_item.rb +1 -1
- data/app/models/spree/order.rb +3 -2
- data/app/models/spree/order/checkout.rb +1 -1
- data/app/models/spree/order/payments.rb +2 -2
- data/app/models/spree/order_capturing.rb +2 -2
- data/app/models/spree/order_taxation.rb +2 -2
- data/app/models/spree/payment.rb +4 -41
- data/app/models/spree/payment/processing.rb +2 -2
- data/app/models/spree/payment_method.rb +2 -2
- data/app/models/spree/product.rb +3 -3
- data/app/models/spree/product/scopes.rb +8 -7
- data/app/models/spree/promotion.rb +27 -12
- data/app/models/spree/promotion/actions/create_quantity_adjustments.rb +1 -1
- data/app/models/spree/promotion/actions/free_shipping.rb +1 -1
- data/app/models/spree/promotion/rules/option_value.rb +2 -2
- data/app/models/spree/promotion/rules/product.rb +3 -3
- data/app/models/spree/promotion_action.rb +1 -1
- data/app/models/spree/promotion_chooser.rb +2 -2
- data/app/models/spree/promotion_code.rb +9 -8
- data/app/models/spree/promotion_code/batch_builder.rb +3 -3
- data/app/models/spree/promotion_rule.rb +1 -1
- data/app/models/spree/refund.rb +2 -2
- data/app/models/spree/reimbursement.rb +3 -11
- data/app/models/spree/reimbursement/reimbursement_type_engine.rb +1 -1
- data/app/models/spree/reimbursement_type/reimbursement_helpers.rb +2 -2
- data/app/models/spree/return_authorization.rb +1 -7
- data/app/models/spree/return_item.rb +3 -42
- data/app/models/spree/return_item/eligibility_validator/default.rb +1 -1
- data/app/models/spree/shipment.rb +4 -38
- data/app/models/spree/shipping_calculator.rb +0 -4
- data/app/models/spree/shipping_method.rb +1 -1
- data/app/models/spree/state.rb +1 -1
- data/app/models/spree/stock/differentiator.rb +1 -1
- data/app/models/spree/stock/package.rb +1 -1
- data/app/models/spree/stock_item.rb +1 -1
- data/app/models/spree/stock_quantities.rb +13 -12
- data/app/models/spree/tax_calculator/default.rb +0 -4
- data/app/models/spree/tax_calculator/shipping_rate.rb +0 -3
- data/app/models/spree/tax_rate.rb +4 -0
- data/app/models/spree/taxon/paperclip_attachment.rb +13 -0
- data/app/models/spree/user_last_url_storer.rb +46 -0
- data/app/models/spree/user_last_url_storer/rules/authentication_rule.rb +36 -0
- data/app/models/spree/variant.rb +9 -9
- data/app/models/spree/wallet/add_payment_sources_to_wallet.rb +1 -1
- data/app/models/spree/zone.rb +1 -1
- data/config/initializers/money.rb +2 -0
- data/config/locales/en.yml +12 -0
- data/lib/generators/spree/install/install_generator.rb +3 -0
- data/lib/generators/spree/install/templates/config/initializers/spree.rb.tt +8 -0
- data/lib/spree/app_configuration.rb +18 -3
- data/lib/spree/core.rb +12 -0
- data/lib/spree/core/controller_helpers/auth.rb +1 -13
- data/lib/spree/core/engine.rb +2 -2
- data/lib/spree/core/environment_extension.rb +9 -0
- data/lib/spree/core/importer/order.rb +26 -26
- data/lib/spree/core/product_filters.rb +15 -15
- data/lib/spree/core/role_configuration.rb +2 -2
- data/lib/spree/core/search/variant.rb +1 -1
- data/lib/spree/core/state_machines.rb +78 -0
- data/lib/spree/core/state_machines/inventory_unit.rb +42 -0
- data/lib/spree/core/state_machines/payment.rb +61 -0
- data/lib/spree/core/state_machines/reimbursement.rb +33 -0
- data/lib/spree/core/state_machines/return_authorization.rb +32 -0
- data/lib/spree/core/state_machines/return_item/acceptance_status.rb +51 -0
- data/lib/spree/core/state_machines/return_item/reception_status.rb +42 -0
- data/lib/spree/core/state_machines/shipment.rb +58 -0
- data/lib/spree/core/stock_configuration.rb +1 -0
- data/lib/spree/core/validators/email.rb +1 -8
- data/lib/spree/core/version.rb +1 -1
- data/lib/spree/money.rb +2 -2
- data/lib/spree/permission_sets/user_management.rb +3 -0
- data/lib/spree/permitted_attributes.rb +3 -3
- data/lib/spree/preferences/static_model_preferences.rb +2 -2
- data/lib/spree/testing_support/dummy_app.rb +4 -1
- data/lib/spree/testing_support/factories/inventory_unit_factory.rb +8 -1
- data/lib/spree/testing_support/factories/promotion_factory.rb +7 -0
- data/lib/spree/testing_support/factories/stock_package_factory.rb +1 -1
- data/solidus_core.gemspec +2 -2
- data/spec/lib/spree/core/environment_extension_spec.rb +12 -1
- data/spec/lib/spree/core/stock_configuration_spec.rb +36 -0
- data/spec/lib/spree/core/validators/email_spec.rb +18 -18
- data/spec/models/spree/address_spec.rb +23 -0
- data/spec/models/spree/calculator/shipping/flat_percent_item_total_spec.rb +1 -1
- data/spec/models/spree/calculator/shipping/flat_rate_spec.rb +1 -1
- data/spec/models/spree/calculator/shipping/flexi_rate_spec.rb +2 -2
- data/spec/models/spree/calculator/shipping/per_item_spec.rb +1 -1
- data/spec/models/spree/calculator/shipping/price_sack_spec.rb +24 -15
- data/spec/models/spree/carton_spec.rb +8 -0
- data/spec/models/spree/classification_spec.rb +21 -9
- data/spec/models/spree/concerns/user_address_book_spec.rb +4 -4
- data/spec/models/spree/concerns/user_methods_spec.rb +2 -1
- data/spec/models/spree/order_merger_spec.rb +3 -3
- data/spec/models/spree/order_spec.rb +8 -15
- data/spec/models/spree/order_updater_spec.rb +4 -3
- data/spec/models/spree/payment_create_spec.rb +4 -14
- data/spec/models/spree/permission_sets/user_management_spec.rb +2 -0
- data/spec/models/spree/preference_spec.rb +4 -4
- data/spec/models/spree/preferences/preferable_spec.rb +3 -3
- data/spec/models/spree/preferences/statically_configurable_spec.rb +2 -2
- data/spec/models/spree/promotion_rule_spec.rb +6 -6
- data/spec/models/spree/promotion_spec.rb +73 -52
- data/spec/models/spree/reimbursement_type/original_payment_spec.rb +1 -1
- data/spec/models/spree/return_item/exchange_variant_eligibility/same_product_spec.rb +1 -1
- data/spec/models/spree/returns_calculator_spec.rb +2 -2
- data/spec/models/spree/shipping_calculator_spec.rb +1 -13
- data/spec/models/spree/shipping_method_spec.rb +32 -0
- data/spec/models/spree/stock/availability_validator_spec.rb +2 -2
- data/spec/models/spree/stock/differentiator_spec.rb +2 -2
- data/spec/models/spree/stock/estimator_spec.rb +3 -3
- data/spec/models/spree/stock/package_spec.rb +28 -28
- data/spec/models/spree/stock/simple_coordinator_spec.rb +11 -11
- data/spec/models/spree/stock/splitter/base_spec.rb +4 -4
- data/spec/models/spree/stock/splitter/shipping_category_spec.rb +7 -7
- data/spec/models/spree/stock_quantities_spec.rb +1 -1
- data/spec/models/spree/store_credit_spec.rb +1 -1
- data/spec/models/spree/tax_rate_spec.rb +1 -0
- data/spec/models/spree/taxons/paperclip_attachment_spec.rb +29 -0
- data/spec/models/spree/user_last_url_storer/rules/authentication_rule_spec.rb +31 -0
- data/spec/models/spree/user_last_url_storer_spec.rb +60 -0
- metadata +17 -12
- data/spec/migrate/20190106184413_remove_code_from_spree_promotions_spec.rb +0 -162
- data/spec/models/spree/order/updating_spec.rb +0 -18
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rails_helper'
|
4
|
-
|
5
|
-
RSpec.describe Spree::Order, type: :model do
|
6
|
-
let(:order) { create(:order) }
|
7
|
-
|
8
|
-
context "#update!" do
|
9
|
-
context "when there are update hooks", partial_double_verification: false do
|
10
|
-
before { Spree::Order.register_update_hook :foo }
|
11
|
-
after { Spree::Order.update_hooks.clear }
|
12
|
-
it "should call each of the update hooks" do
|
13
|
-
expect(order).to receive :foo
|
14
|
-
order.recalculate
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|