Andy Brett
c3c482c0fe
fix failing spec
...
Another PR introduced a before_action to the controller, so we have to stub that out to avoid the double receiving an unexpected message
2021-04-08 08:53:35 -07:00
Andy Brett
9b3628a4dd
Merge pull request #7299 from andrewpbrett/line-item-fees
...
Update fees after changing a line item
2021-04-08 07:26:34 -07:00
Maikel Linke
cf22a864f3
Fix typo in spec description
2021-04-08 09:24:39 +10:00
Maikel Linke
f0d5bf0ab5
Disallow changes of canceled order
2021-04-08 09:24:39 +10:00
Maikel Linke
f2a2cbd3f9
Spec stock bug when changing canceled orders
...
We decided to disallow changing canceled orders in a way that would
affect stock or totals.
2021-04-08 09:24:39 +10:00
Maikel Linke
8079fb0315
Add specs for stock changes
2021-04-08 09:24:39 +10:00
Maikel Linke
e1d22aec83
Prepare for more shipment specs with different context
...
This commit is best viewed ignoring whitespaces.
2021-04-08 09:24:39 +10:00
Maikel Linke
c5e72f8563
Test shipment changes more precisely
2021-04-08 09:24:39 +10:00
Maikel Linke
65b37b249d
Prepare spec code for re-use
2021-04-08 09:24:39 +10:00
Maikel Linke
d571bc731b
Style spec with rubocop -a
2021-04-08 09:24:39 +10:00
Andy Brett
5bfd6fd2ba
add spec for fee recalculation
2021-04-03 10:54:57 -07:00
Andy Brett
5a19a14042
rename to v0
2021-03-27 11:21:18 -07:00
Luis Ramos
f6f9159430
Fix rspec syntax
2021-03-26 23:45:12 +00:00
Luis Ramos
8f7025b8c6
Fix rspec syntax
2021-03-26 23:01:23 +00:00
Matt-Yorkley
0f5af2d9f1
Merge pull request #6927 from Matt-Yorkley/adjustments-payment-fee
...
[Adjustments] Payment fee adjustment
2021-03-25 17:40:53 +01:00
Matt-Yorkley
26ed44412f
Update #validates definitions
...
Where the presence of an object is being validated and that object comes from an *association*, we should use `validates :object, presence: true` instead of `validates :object_id, presence: true`.
This does not apply in the same way to validations on uniqueness of certain attributes, such as `validates :object_id, uniqueness...`
2021-03-24 15:43:09 +00:00
Luis Ramos
7c8c720976
Fix rspec syntax to work with rails 5.2
2021-03-23 21:41:03 +00:00
Matt-Yorkley
a0e6b64e98
Update Order serializer
2021-03-23 18:17:50 +00:00
Andy Brett
50296458b8
Merge pull request #7097 from luisramos0/rails-5-2-rspec-params
...
Rails 5 2 update Rspec controller syntax
2021-03-22 17:29:29 -07:00
Luis Ramos
f710bbed3e
Convert calls to xhr to post or put with xhr: true
2021-03-16 23:31:43 +00:00
Luis Ramos
58c3c49cfb
Adapt to new rspec syntax
2021-03-16 23:31:43 +00:00
Luis Ramos
53d758ca21
Replace render text with render plain for rails 5.1
2021-03-16 23:13:58 +00:00
Matt-Yorkley
5354c63d9a
Fix payment capture handling in Api::OrdersController
...
Fixes:
NoMethodError: undefined method `t' for #<Api::OrdersController:0x0000000013834290>
Location
app/controllers/api/orders_controller.rb:50 - payment_capture_failed
2021-03-15 10:36:07 +00:00
Matt-Yorkley
fd1b14ca4a
Fix string/integer issues in states controller spec
2021-03-11 12:06:00 +00:00
Matt-Yorkley
045cdec23c
Update OrderDetailedSerializer
2021-03-04 14:27:02 +00:00
Andy Brett
448c0e0ce3
Remove duplicate specs
...
The second of these is flaky; moreover, the OrdersController doesn't specifically have a method that they're testing. I think the ready_to_capture behaviors is adequately covered by 006236b8dd/spec/serializers/api/admin/order_serializer_spec.rb (L39-L68)
2021-02-27 15:05:11 -08:00
Pau Perez
20a7f2f24e
Eager load payment and subs. order associations
...
This removes the N+1 queries caused by
`Api::Admin::OrderSerialier#ready_to_capture` when used from
`Api::OrdersController#index`. While it's fine for the single-order
controller actions, it's not for this one that deals with a collection
of orders.
Fortunately, `SearchOrders` is used only in this controller action so we
can put the `includes` calls there, otherwise, we would need to refactor
it a bit to pass in a context-specific AR relation.
2021-02-23 10:26:12 -08:00
Matt-Yorkley
d6442bb16f
Fix get requests in API controller spec
2021-02-09 11:57:00 +00:00
Luis Ramos
1643636d43
Replace spree_get with simple call to get
2021-01-22 22:32:48 +00:00
Matt-Yorkley
87b14f0237
Avoid using #allow_any_instance_of
2021-01-08 17:47:09 +00:00
Matt-Yorkley
3b1ad29d20
Fix view rendering in Api::BaseController
2021-01-08 17:47:09 +00:00
Matt-Yorkley
d90ed56603
Add missing test for Api::OrderCyclesController responses
2021-01-08 17:47:09 +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
b7aa04353c
Fix requires of product duplicator
2020-11-04 12:15:45 +00:00
Luis Ramos
1bce516a45
Make specs load product duplicator
...
This makes the ofn version of the product duplicator be used instead of the spree one
2020-11-04 12:15:45 +00:00
Luis Ramos
a2610279d9
Merge pull request #5976 from luisramos0/address_form
...
Fix address state selector and "use billing address" checkbox in order customer details page
2020-09-23 12:42:37 +01:00
Luis Ramos
212820b3da
Merge pull request #5912 from luisramos0/tcs
...
Terms and Conditions - upload PDF in the Enterprise Business Details and read them on Checkout
2020-09-17 12:01:45 +01:00
Luis Ramos
88d90a37e8
Run transpec
2020-09-01 15:53:18 +01:00
Luis Ramos
ed114f4c4c
Fix rubocop issues
2020-09-01 15:52:36 +01:00
Luis Ramos
ffa0d202be
Add states api endpoint to support existing code on the customer details page when user changes country
2020-09-01 15:46:22 +01:00
Luis Ramos
66587ccc00
Allow user to remove terms and conditions file
2020-08-31 17:40:34 +01:00
Luis Ramos
cfdfd82d9a
Replace api controller test helpers with easier existing alternatives
2020-08-31 17:05:51 +01:00
Luis Ramos
b872bf49c5
Replace usage of helper method with a more simple approach
2020-08-31 16:56:48 +01:00
Luis Ramos
f6277416ce
Simplify stock location factory and fix related issues in several factories
2020-08-23 17:34:02 +01:00
Luis Ramos
a2ebc614d9
Rename AuthenticationWorkflow to AuthenticationHelper
2020-07-27 15:32:35 +01:00
Luis Ramos
1af4bf6994
Replace usage of create_enterprise_user with :user factory
2020-07-27 14:44:23 +01:00
Luis Ramos
1666ffb191
Remove try_spree_current_user
...
This can be done because the method is defined in OFN's ApplicationController, so spree_current_user is available in all controllers
2020-07-15 14:53:35 +01:00
Luis Ramos
91fc0cd26f
Adapt specs to new Ar method update that replaces update_attributes
2020-06-22 17:39:20 +01:00
Luis Ramos
f848a89a00
Rename update_attributes to update #rails4
2020-06-22 16:51:43 +01:00
Luis Ramos
473fee19eb
Fix rubocop issues
2020-06-22 13:03:18 +01:00