bugfix - reseting shipments after currency change#4
bugfix - reseting shipments after currency change#4rafalkosla101 wants to merge 5 commits intomasterfrom
Conversation
| def change_currency | ||
| spree_authorize! :update, spree_current_order, order_token | ||
|
|
||
| spree_current_order.ensure_updated_shipments |
There was a problem hiding this comment.
This logic should be moved to change_currency_service, to make the behavior consistent for all users of change currency service
| end | ||
| end | ||
|
|
||
| context 'if the order has shipping methods after change' do |
There was a problem hiding this comment.
Not sure if I follow this logic, will it have shipments after the change or not?
There was a problem hiding this comment.
it will after the GetShippingRates is called(it generates a generic shipment) but the shipment will be different from the previous one - from the customer side it would like like: get products into cart -> go to checkout -> choose shipping method -> change currency to EUR -> check if user can choose shipment method and if the shipment method is not the same as used in previous currency
There was a problem hiding this comment.
Okay, could you make the name of this context more clear? The 'if' sounds like there's something that you're not sure of inside the test. Something like when user requests shipping methods after changing currency
https://www.betterspecs.org/ <- here's a nice guideline on structuring and naming test cases
No description provided.