Closes #33; New error messages

This commit is contained in:
Daniel Weiser 2020-08-05 17:43:56 +03:00
parent f46bffa9b3
commit 3be09aff75

View File

@ -19,7 +19,7 @@ func TestClient_OrderDeliveryData(t *testing.T) {
data, _ := json.Marshal(d) data, _ := json.Marshal(d)
expectedStr := `{"payerType":"type","pickuppointAddress":"address","status":"status","trackNumber":"track"}` expectedStr := `{"payerType":"type","pickuppointAddress":"address","status":"status","trackNumber":"track"}`
if string(data) != expectedStr { if string(data) != expectedStr {
t.Error("error") t.Errorf("Marshaled: %s\nExpected: %s\n", data, expectedStr)
} }
d.AdditionalFields = map[string]interface{}{ d.AdditionalFields = map[string]interface{}{
@ -30,7 +30,7 @@ func TestClient_OrderDeliveryData(t *testing.T) {
data, _ = json.Marshal(d) data, _ = json.Marshal(d)
expectedStr = `{"customFirst":"one","customSecond":"two","payerType":"type","pickuppointAddress":"address","status":"status","trackNumber":"track"}` expectedStr = `{"customFirst":"one","customSecond":"two","payerType":"type","pickuppointAddress":"address","status":"status","trackNumber":"track"}`
if string(data) != expectedStr { if string(data) != expectedStr {
t.Error("error") t.Errorf("Marshaled: %s\nExpected: %s\n", data, expectedStr)
} }
d = OrderDeliveryData{} d = OrderDeliveryData{}