Luis Ramos
23627c5453
Run rubocop -a (safe corrections) removing all exceptions so all possible fixes are applied
...
9290 issues fixed
2021-06-17 22:19:26 +01:00
Matt-Yorkley
443b180f32
Update order totals in :order_with_totals factory
2021-06-04 17:10:50 +01:00
Luis Ramos
b2e97fe1d2
Rename order.update! to order.update_order! and adjustment.update! to adjustment.update_adjustment!
2021-05-19 09:54:22 -07:00
Matt-Yorkley
932d000c9d
Improve shipping method factory
...
You can now specify an amount for the flat_rate option.
2021-04-30 12:19:43 +01:00
Andy Brett
9906afa1a6
use capture! if payment is already authorized
2021-04-27 17:59:03 -07:00
Maikel Linke
db0e681add
Open order cycle factory for passing enterprises
...
The simple order cycle factory was flexible enough already to work with
given suppliers and distributors. We are now re-using that code so that
you can pass these enterprises when creating a normal order cycle, too.
2021-04-20 16:06:45 +10:00
Matt-Yorkley
ebce32c57b
Update factory and specs
2021-04-14 12:01:21 +01:00
Matt-Yorkley
e1a10db410
Remove :tag_rule factory and update tests to use alternate (valid) factories
2021-04-08 12:37:45 +01:00
Matt-Yorkley
a060b9fe5a
Update LineItemsController and order factory
2021-04-04 19:19:06 +01:00
Matt-Yorkley
0d5d4aca11
Update tax_rate_factory
...
The amount is a decimal, so `0.1` here is actually a 10% tax rate. `100` is ridiculous (10000% tax).
Also, the factory fails without a calculator, and it should explicitly be a DefaultTax calculator or it will not be correct.
2021-04-04 19:19:06 +01:00
Matt-Yorkley
0fea92b63d
Add :default_tax_calculator factory
2021-04-04 19:19:06 +01:00
Maikel Linke
ffb4ba5ef5
Style numeric predicate use with Rubocop
2021-03-25 18:07:11 +11:00
Matt-Yorkley
c827d77236
Fix reloading completed_order_with_fees factory
2021-03-11 12:19:55 +00:00
Matt-Yorkley
57b54637e3
Ensure order factory selects shipping rates correctly
2021-03-04 14:27:02 +00:00
Matt-Yorkley
86110f2f40
Improve shipment factory
2021-03-04 14:27:02 +00:00
Matt-Yorkley
c093701adf
Improve UserBalanceCalculator spec test setup
...
Previously we were creating order objects that were not actually complete, and manually setting the `completed_at` field. This meant the order objects being tested were not actually in the correct state, ie: pre-checkout orders that had not been processed properly.
2021-03-04 14:27:02 +00:00
Matt-Yorkley
0e3429dc35
Merge pull request #6758 from Matt-Yorkley/enterprise-fees-refactor
...
Enterprise fees refactor
2021-02-22 17:59:18 +01:00
Matt-Yorkley
9303d61db1
Update specs
2021-02-19 11:17:58 +00:00
Matt-Yorkley
81ac2c5add
Delete code related to :cost_price field
2021-02-17 14:27:51 +00:00
Matt-Yorkley
9abf6cdcdf
Rename expensive method Order#update_distribution_charge!
...
This method is named "update distribution charge". What this method actually does is delete all of the fee adjustments on an order and all it's line items, then recreate them all from scratch. We call this from lots of different places all the time, and it's incredibly expensive. It even gets called from inside of transactions being run inside callbacks. Renaming it hopefully will add a bit of clarity.
This needs to be a lot more granular!
2021-01-29 21:52:28 +00:00
Pau Perez
9d0dd968b1
Test customer balance query with guest orders
...
Guest orders also have an associated customer record that is created
by Spree::Order#ensure_customer at checkout. Subsequent orders will use
that one due to Spree::Order#associate_customer.
2021-01-11 15:50:19 +01:00
Luis Ramos
bcf7cc1013
Replace ignore with transient according to changes in factory bot v5
2020-12-10 22:16:17 +00:00
Luis Ramos
9728b088f9
Fix syntax for nil properties
2020-12-09 23:38:16 +00:00
Luis Ramos
c17998774e
Adapt factories to factory_bot_rails v5 syntax
2020-12-09 23:09:33 +00:00
Luis Ramos
2b8f0abe49
Try some mass auto-correct adding frozen-string-literal to all specs
2020-12-03 06:38:24 -08:00
Luis Ramos
7a5a4f956a
Replace use of Faker with FFaker
2020-12-02 11:40:50 -08:00
Luis Ramos
72a39fdf54
Add required factory from spree_core
2020-11-04 12:15:23 +00:00
Luis Ramos
75cec3b606
Fix issue Style/HashSyntax
2020-10-30 16:50:37 +00:00
Luis Ramos
92417d849c
Fix rubocop issue Rails/DynamicFindBy
2020-10-30 16:50:37 +00:00
Luis Ramos
40f8c785a2
Fix Lint/UnusedBlockArgument
2020-10-30 16:50:37 +00:00
Luis Ramos
403384dbb1
Fix rubocop isssues, trailing whitespaces and empty lines
2020-10-30 16:50:37 +00:00
Luis Ramos
b267f542d1
Merge pull request #5980 from luisramos0/spree_clean_up
...
[Bye bye spree] Some clean up fixes to make it all work without spree
2020-10-20 18:52:54 +01:00
Jason Hsu
c39e238e83
Updated spec/factories/calculator_factory.rb to remove unnecessary space; reduces number of RuboCop offenses from 91 to 90
2020-10-16 00:08:19 -05:00
Maikel
8c65498661
Merge pull request #5998 from andrewpbrett/shipping-per-pound
...
Per-pound shipping calculator
2020-10-16 15:27:57 +11:00
Pau Pérez Fabregat
427d1aaeff
Merge pull request #6079 from arku/perf/test-prof-setup
...
Set up test_prof gem
2020-10-06 10:30:43 +02:00
Arun Kumar Mohan
6c27ac5f99
Improve filter shipping methods tag rule specs' performance
2020-10-01 01:43:08 -05:00
Arun Kumar Mohan
bb38523767
Improve filter products tag rule specs' performance
2020-10-01 01:43:08 -05:00
Arun Kumar Mohan
e109ed6be7
Improve filter payment methods tag rule specs' performance
2020-10-01 01:43:08 -05:00
Arun Kumar Mohan
780f31f98e
Improve filter order cycles tag rule specs' performance
2020-10-01 01:43:05 -05:00
Matt-Yorkley
70bd2161ba
Rename Stripe Connect factory for clarity
2020-09-19 12:55:31 +01:00
Luis Ramos
01daf63fc6
Fix some problems with code that was relying on spree code
2020-09-17 13:57:05 +01:00
Andy Brett
246934d8ba
update preference name in factor and specs
2020-09-12 14:49:42 -07:00
Andy Brett
adb29a9c8f
add preferred_unit to weight shipping calculator
2020-09-07 08:41:48 -07:00
Andy Brett
5793f0103d
Revert "Add a per-pound calculator and a spec for it"
...
This reverts commit e8eadcbf39 .
2020-09-07 07:50:59 -07:00
Andy Brett
e8eadcbf39
Add a per-pound calculator and a spec for it
2020-09-06 09:03:06 -07:00
Luis Ramos
8867ec977c
Bring missing factory from spree_core and use ofn's calculator
2020-09-05 16:38:37 +01:00
Luis Ramos
b35d579f64
Bring stock_movement factory from spree_core
2020-09-01 10:20:51 +01:00
Luis Ramos
3198bbd3cb
Bring required factory from spree_core
2020-09-01 10:17:45 +01:00
Pau Perez
37bfdf69a9
Bring required state factory
...
It was removed from master in
2abbfad18c
but it's still required by the zone_specs and the address factory.
2020-08-28 12:44:30 +02:00
Pau Pérez Fabregat
4984cc9758
Merge branch 'master' into ctry_zone
2020-08-28 09:21:57 +02:00