diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-05-09 15:45:32 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-05-09 15:45:32 -0400 |
| commit | 5319e2af4c4a11c90323db7359e8edced6edc1fc (patch) | |
| tree | b4bd6f09db3adf2d0174e175b466c59f445b0c9b /ship_test.go | |
| parent | 8e1e1b0b71cea0705bb2ab7ed9b4c25379b92a77 (diff) | |
| download | lulu-5319e2af4c4a11c90323db7359e8edced6edc1fc.zip | |
unmarshal /print-job-cost-calculations response
Diffstat (limited to 'ship_test.go')
| -rw-r--r-- | ship_test.go | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/ship_test.go b/ship_test.go deleted file mode 100644 index b91e671..0000000 --- a/ship_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package lulu - -import ( - "testing" -) - -func TestMarshalUnmarshalShippingAddress(t *testing.T) { - for _, pair := range []struct { - j string - addr ShippingAddress - }{ - { - `{ - "city": "Lübeck", - "country_code": "DE", - "postcode": "23552", - "state_code": "", - "street1": "Holstenstr. 40", - "phone_number": "844-212-0689" - }`, - ShippingAddress{ - "Lübeck", - "DE", - "23552", - "", // TODO: does the API mind if this is "" instead of null? - "Holstenstr. 40", - "844-212-0689", - }, - }, { - `{ - "city": "Anytown", - "country_code": "CA", - "postcode": "A1A 1A1", - "state_code": "QC", - "street1": "123 Fake Street", - "phone_number": "123-456-7890" - }`, - ShippingAddress{ - "Anytown", - "CA", - "A1A 1A1", - "QC", - "123 Fake Street", - "123-456-7890", - }, - }, - } { - requireMarshalJsonEq(t, pair.j, pair.addr) - requireUnmarshalJsonEq(t, pair.addr, pair.j) - } -} |