Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Always use the same zipcode in address factory #84

Merged
merged 1 commit into from
May 9, 2017

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented May 8, 2017

The Solidus address factory randomizes the zipcode. The OrderWalkThrough we use in the credit card checkout spec uses this factory for the user addresses.

For credit card payments we transmit the billing address to braintree, for paypal payments the shipping address.

As we match the body in our VCR settings VCR can not match the request anymore and therefore cannot replay existing cassettes. This leads to sporadic failing tests.

By modifying the spree address factory we ensure that the zipcode is always the same.

@tvdeyen
Copy link
Member Author

tvdeyen commented May 8, 2017

😞

@tvdeyen tvdeyen self-assigned this May 8, 2017
@Senjai
Copy link
Contributor

Senjai commented May 8, 2017

We'll need a comment explaining why this change needs to be there. Could we also change this in core?

@tvdeyen tvdeyen force-pushed the harden-credit-card-checkout-spec branch from b3a4198 to 71adeec Compare May 9, 2017 07:03
@tvdeyen
Copy link
Member Author

tvdeyen commented May 9, 2017

@Senjai added a comment.

Could we also change this in core?

👍 I also thought this might be a good idea. Will open a PR.

The Solidus address factory randomizes the zipcode. The OrderWalkThrough we use in the credit card checkout spec uses this factory for the user addresses.

For credit card payments we transmit the billing address to braintree, for paypal payments the shipping address.

As we match the body in our VCR settings VCR can not match the request anymore and therefore cannot replay existing cassettes.

By modifying the spree address factory we ensure that the zipcode is always the same.
@tvdeyen tvdeyen force-pushed the harden-credit-card-checkout-spec branch from 71adeec to 6ad3a88 Compare May 9, 2017 07:08
@tvdeyen
Copy link
Member Author

tvdeyen commented May 9, 2017

Will open a PR.

It turns out that we want to have the address factory support zipcodes for various countries.

@Senjai Senjai merged commit ab37997 into solidusio:master May 9, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants