Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec customer creation during checkout #7443

Merged
merged 2 commits into from
Apr 20, 2021
Merged

Spec customer creation during checkout #7443

merged 2 commits into from
Apr 20, 2021

Conversation

mkllnk
Copy link
Member

@mkllnk mkllnk commented Apr 20, 2021

What? Why?

Related to #6038.

I tried to replicate the issue of missing customer records and extended the specs. I didn't find the cause of the issue but the spec improvements are still worth merging. I'm testing the customer creation on controller level because that's where we are probably going to move the customer creation logic to (instead of callbacks in models).

The order cycle factory needed a bit of refactoring to create all the data needed for a checkout.

What should we test?

Just passing specs.

Release notes

Changelog Category: Technical changes

Improved test coverage of the checkout.

mkllnk added 2 commits April 20, 2021 16:06
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.
Expanding the controller spec with real data instead of mocks to test
the real callback behaviours.
@mkllnk mkllnk self-assigned this Apr 20, 2021
@mkllnk mkllnk requested a review from sauloperez April 20, 2021 06:25
@codecov
Copy link

codecov bot commented Apr 20, 2021

Codecov Report

Merging #7443 (1753156) into master (aca19ed) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7443   +/-   ##
=======================================
  Coverage   93.07%   93.08%           
=======================================
  Files         633      633           
  Lines       18148    18148           
=======================================
+ Hits        16892    16893    +1     
+ Misses       1256     1255    -1     
Impacted Files Coverage Δ
app/serializers/api/variant_serializer.rb 100.00% <0.00%> (+4.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aca19ed...1753156. Read the comment docs.

Copy link
Contributor

@sauloperez sauloperez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@sauloperez
Copy link
Contributor

This will come in handy to finish #7433. Let's see if we can merge it first.

@Matt-Yorkley Matt-Yorkley merged commit a3b90f3 into openfoodfoundation:master Apr 20, 2021
@mkllnk mkllnk deleted the order-cycle-factory branch July 15, 2021 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants