SuperGoodSoft / solidus_taxjar

Support for using TaxJar to handle tax calculations in Solidus
BSD 3-Clause "New" or "Revised" License
12 stars 12 forks source link

Update spec setup to reset state in `before` block #211

Closed forkata closed 1 year ago

forkata commented 1 year ago

What is the goal of this PR?

This change fixes the specs against the master Solidus branch in preparation for the 1.0 release of this gem.

In a recent change to core, an after(:build) hook was added to set the state on the address record for countries which require states. This interferes with the spec setup by ignoring the state attribute we were setting to nil. Instead we have moved that to a before block so that we can correctly setup the test address to not have a state.

Relevant change upstream - https://github.com/solidusio/solidus/pull/4272

How do you manually test these changes? (if applicable)

  1. N/A

Merge Checklist