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
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
luisramos0
a83af367b4
Fix order_spec related to retrieving previously ordered items
...
In spree 2, each completed_order_with_totals comes with 5 line items (see order_factory in spree), so instead of 1+1+1=3 the calculation becomes 5+5+1=11
2018-10-18 10:54:21 +01:00
luisramos0
74eff8730b
Fix tests of fees in a completed order in models/spree/order_spec by:
...
- set distributor with taxes on the order
- simplify the factory completed_order_with_fees by replacing shipment with shipping_method and ship_address and letting the order workflow handle shipments and inventory units
2018-10-18 10:54:21 +01:00
Maikel Linke
9698fd3c5a
Style spec
2018-10-18 11:07:16 +11:00
Maikel Linke
d197c8587f
Test address deletion
2018-10-18 11:06:32 +11:00
Maikel Linke
e96cab957a
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/spree/addresses_spec.rb
* 13 conversions
from: obj.should
to: expect(obj).to
* 2 conversions
from: it { should ... }
to: it { is_expected.to ... }
* 1 conversion
from: obj.should_not
to: expect(obj).not_to
For more details: https://github.com/yujinakayama/transpec#supported-conversions
2018-10-18 10:52:46 +11:00
fabricio.albarnaz
8e4adbd23a
Add more test cases
2018-10-16 15:34:46 -03:00
Luis Ramos
3e4f92fe92
Merge branch '2-0-stable' into 2-0-adjust-basic-spec-fix
2018-10-16 17:33:33 +01:00
Pau Pérez Fabregat
c99fec44da
Merge pull request #2824 from luisramos0/2-0-order-spec
...
[Spree Upgrade] Fix taxes tests in models/spree/order_spec
2018-10-16 18:09:33 +02:00
Pau Pérez Fabregat
f2fe3c8cff
Merge pull request #2812 from luisramos0/2-0-adjust-enterprise-fees-spec-fix
...
[Spree Upgrade] Fix enterprise fees specs in adjustment_spec - tax_rate
2018-10-16 18:02:21 +02:00