feat(tax): normalize country and province code (#6513)
**What** - Ensures that country and province codes are always stored as lower case. - Ensures that calculation context normalizes input before getting region rates.
This commit is contained in:
1 parent
be8122bc0d
commit
d03b72ecdd
3 files changed
+68
-29
No files matched your search
@@ -34,14 +34,14 @@ moduleIntegrationTestRunner({
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: region.id,
|
||||
country_code: "US",
|
||||
country_code: "us",
|
||||
province_code: null,
|
||||
parent_id: null,
|
||||
}),
|
||||
expect.objectContaining({
|
||||
id: provinceRegion.id,
|
||||
country_code: "US",
|
||||
province_code: "CA",
|
||||
country_code: "us",
|
||||
province_code: "ca",
|
||||
parent_id: region.id,
|
||||
}),
|
||||
])
|
||||
@@ -397,6 +397,7 @@ moduleIntegrationTestRunner({
|
||||
expect(taxRegions).toEqual([
|
||||
expect.objectContaining({
|
||||
id: region.id,
|
||||
country_code: "us",
|
||||
deleted_at: expect.any(Date),
|
||||
}),
|
||||
])
|
||||
|
||||
Reference in new issue
Block a user