luisramos0
4f79fd5be0
Improve availability validator spec readability and remove unnecessary expect statements
2018-12-21 11:19:12 +00:00
luisramos0
c1aeb2e9a3
Improve naming in availability_validator_decorator and cover it with tests
2018-12-20 14:26:34 +00:00
luisramos0
3085e15961
Fix order factory by making line_item.skip_stock_check work in spree 2
2018-12-20 14:26:34 +00:00
luisramos0
66e69edca4
Rename ProductOnDemand to ProductStock; move product.on_hand into it; add product.on_demand; and remove unnecessary on_demand=
2018-12-12 12:10:25 +00:00
Pau Pérez Fabregat
7834fa4d00
Merge pull request #3190 from luisramos0/2-0-new-product
...
[Spree Upgrade] Fix "new product" page specs and an html issue
2018-12-11 08:35:26 +01:00
Maikel
d63ae792b3
Merge pull request #2775 from luisramos0/2-0-checkout-ship-method
...
[Spree Upgrade] Handle shipping_method_id in checkout
2018-12-11 11:59:03 +11:00
luisramos0
4f4fc00549
Improve code, specs and comments in the shipping_method selection process in the checkout controller
2018-12-09 20:05:10 +00:00
luisramos0
7ecce51b8b
Create default stock location and set required product.shipping_category in specs that create products
2018-12-08 14:52:50 +00:00
Maikel
a2c8bea147
Merge pull request #3147 from luisramos0/2-0-vos
...
[Spree Upgrade] Adapt variant overrides to spree 2
2018-12-05 10:50:20 +11:00
luisramos0
e23c4dda68
Add order_shipping_method specs to cover select_shipping_method
2018-11-30 12:58:27 +00:00
luisramos0
d962358f15
Fix rubocop and transpec models/variant_override and its spec
2018-11-30 00:43:55 +00:00
luisramos0
0577011f5b
Refactor variant override model and its spec: simplify move_stock and remove unused methods
2018-11-30 00:22:04 +00:00
Pau Perez
7834b1d3f3
Fix test case for invalid product master
2018-11-28 17:39:59 +01:00
luisramos0
d28f47046a
Fix product model spec by removing unnecessary on_hand setter and adding required fields for a new product
2018-11-22 20:38:58 +00:00
Maikel
6835d24fbf
Merge pull request #3004 from luisramos0/2-0-mail-method-fix
...
[Spree Upgrade] Fix line Item specs with problems related to VariantStock.on_hand=
2018-11-20 16:37:19 +11:00
luisramos0
bf32a21155
Allow adapted on_hand attr to be mass assigned in VariantStock.
...
Without specifying it in `attr_accessible`, `#assign_attributes` won't
work. See details in
https://apidock.com/rails/v3.2.13/ActiveRecord/Persistence/update_attributes
and https://apidock.com/rails/ActiveRecord/Base/assign_attributes .
2018-11-19 10:05:17 +00:00
luisramos0
ee8d77bc09
Fix order spec restart checkout test by adding a required line_item to the order being tested
2018-11-17 11:57:16 +00:00
Maikel
5d200b7753
Merge pull request #3026 from luisramos0/2-0-calculator-line-items-for
...
[Spree Upgrade] Improve failed_checkout_spec by making calculator decorator line_items_for work with new Stock::Package
2018-11-16 10:41:29 +11:00
luisramos0
688ec5fb21
Fix rubocop issues in calculator_decorator and calculator/flat_percent_item_total_spec
2018-11-14 23:04:38 +00:00
luisramos0
7c0627a823
Improve failed_checkout_spec by making calculator decorator line_items_for work with new Stock::Package
2018-11-14 23:04:38 +00:00
luisramos0
0a77eeb4b6
Merge branch 'master' into 2-0-stable-nov-14th
2018-11-14 11:35:58 +00:00
Maikel
d8d20429aa
Revert "Instagram pattern"
2018-11-09 13:33:11 +11:00
Luis Ramos
0ea0016fc9
Merge pull request #2998 from coopdevs/adapt-product-on-demand
...
[Spree Upgrade] Adapt product on demand
2018-11-08 19:21:46 +00:00
Pau Perez
de31823151
Add #on_demand= to make product creation page work
...
We're bringing in the setter that got removed in Spree 2.0 so that we
can still pass an on_demand value from the product creation form.
However, we won't keep the getter to keep things simple. The frontend
seems to be checking the existence of variants anyway, so then it can
also check for product.master.on_demand and we avoid some logic on the
backend.
2018-11-08 11:41:58 +00:00
luisramos0
fcdb5cd7af
Merge branch 'master' into 2-0-stable-nov-8th
2018-11-08 11:18:54 +00:00
luisramos0
9490da329a
Move Calculator::Weight from models/open_food_network/calculator to models/calculator
2018-11-07 09:54:30 +00:00
luisramos0
bf55f50a7e
Fix rubocop warnings on weight and weight_spec
2018-11-07 09:54:30 +00:00
luisramos0
275a192270
Convert specs to RSpec 3.7.1 syntax with Transpec
...
This conversion is done by Transpec 3.3.0 with the following command:
transpec spec/models/calculator/weight_spec.rb
* 3 conversions
from: == expected
to: eq(expected)
* 3 conversions
from: obj.should
to: expect(obj).to
For more details: https://github.com/yujinakayama/transpec#supported-conversions
2018-11-07 09:54:30 +00:00
luisramos0
1ef04354fd
Add capacity to weight calculator to calculate based on any object with an order (needed in spree 2 to calculate based on package)
2018-11-07 09:54:30 +00:00
Pau Pérez Fabregat
057412111d
Merge pull request #2972 from coopdevs/mark-last-failing-enterprise-spec-pending
...
[Spree Upgrade] Mark last failing enterprises spec as pending
2018-11-05 18:59:47 +01:00
Pau Perez
21d756a1af
Mark last failing enterprises spec as pending
...
This will get solved once we complete
https://github.com/openfoodfoundation/openfoodnetwork/issues/2971 . Until
then, let's not focus on this spec to reach our 100% green test suite.
2018-11-05 16:45:53 +00:00
Pau Pérez Fabregat
50a06d1bd9
Merge pull request #2969 from luisramos0/2897-2-0-price-fix
...
[Spree Upgrade] Fix specs creating deleted variants
2018-11-05 11:59:06 +01:00
luisramos0
4f992a18f7
Fix specs creating deleted variants
...
Spree checks that each price belongs to a variant
Since we were creating deleted variants, the price models couldnt see those
2018-11-05 10:43:10 +00:00
Pau Pérez Fabregat
fe8303cb19
Merge pull request #2957 from luisramos0/2-0-paypal-spec
...
[Spree Upgrade] Fix occurrences of order.shipping_method= by replacing with order.shipments
2018-11-02 15:50:59 +01:00
Pau Pérez Fabregat
ad743a03ac
Merge pull request #2888 from luisramos0/backorders-line-items
...
[Spree Upgrade] Replace allow_backorders with variant.on_demand in the line_item_decorator
2018-11-02 15:45:25 +01:00
Pau Pérez Fabregat
3b85bbe911
Merge pull request #2923 from mkllnk/2882-extract-email-setup-in-specs
...
Extract email setup in specs for easy upgrade
2018-11-02 15:40:19 +01:00
Pau Pérez Fabregat
a910fc50f5
Merge pull request #2926 from luisramos0/2-0-stable-oct-25
...
[Spree Upgrade] Merging master into 2-0-stable (second run in October2018)
2018-11-02 15:37:34 +01:00
luisramos0
8a034a1538
Fix occurrences of order.shipping_method= by replacing with order.shipments=
2018-10-30 13:37:45 +00:00
Maikel
d63670d675
Merge pull request #2846 from Matt-Yorkley/pi/rename_enterprise_fields
...
[Product Import] Rename enterprise fields and update template
2018-10-30 15:11:02 +11:00
Maikel
7609496df3
Merge pull request #2859 from albarnaz/instagram_pattern
...
Instagram pattern
2018-10-30 15:10:27 +11:00
luisramos0
b16ed86b2d
Fix shipping_method basic test. Adapt to spree 2 that needs shipping_categories to be set and sets them on the base factory in a after_create block, the build command was not picking it up
2018-10-27 20:34:25 +01:00
Pau Pérez Fabregat
8a3f621b42
Merge pull request #2893 from luisramos0/deleted_products_break_inventory
...
Fix bug in inventory management page
2018-10-25 18:20:42 +02:00
luisramos0
90d7b7f4a0
Merge branch 'master' into 2-0-stable-oct-25
2018-10-25 14:28:58 +01:00
Maikel Linke
e6adb8a3b9
Extract email setup in specs for easy upgrade
...
The way we set up email sending completely changes with Spree 2. This
change encapsulates that code in a single method so that it can be
changed easily and doesn't create further merge conflicts while we are
still working on the master branch and the Spree upgrade.
2018-10-25 13:53:22 +11:00
Pau Pérez Fabregat
9ef4852bd4
Merge pull request #2818 from nikobozi/refactor-variant-overrides-query
...
Move query from variant_overrides_controller to its model scope
2018-10-24 11:42:22 +02:00
luisramos0
6f78f3c595
Move all specs in proxy_order_spec temporarily to pending
2018-10-21 22:08:10 +01:00
luisramos0
3afc59c864
Move all specs in products_reset_strategy_spec (part of product import feature) temporarily to pending
2018-10-21 22:04:16 +01:00
luisramos0
5b6b0f408f
Move all specs in product_importer_spec temporarily to pending. There were 11 temporarily pending tests but more were failing
2018-10-21 22:02:34 +01:00
luisramos0
9079437284
Add before_destroy to enterprise_relationship so that variant overrides are revoked when permission is deleted
2018-10-20 12:32:51 +01:00
luisramos0
c373d5ab33
Replace usage of global allow_backorders with variant.on_demand in line item sufficient stock method
2018-10-18 19:44:38 +01:00