Conditions | 1 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package client |
||
11 | func TestWebhookRequest_Order(t *testing.T) { |
||
12 | // Setup |
||
13 | t.Parallel() |
||
14 | |||
15 | var request WebhookRequestOrder |
||
16 | err := json.Unmarshal(stubs.WebhookRequestOrderCreated(), &request) |
||
17 | assert.Nil(t, err) |
||
18 | |||
19 | assert.Equal(t, WebhookRequestMeta{ |
||
20 | EventName: "order_created", |
||
21 | TestMode: false, |
||
22 | CustomData: map[string]any{ |
||
23 | "customer_id": float64(25), |
||
24 | }, |
||
25 | }, request.Meta) |
||
26 | |||
27 | assert.Equal(t, "89b36d62-4f5c-4353-853f-0c769d0535c8", request.Data.Attributes.Identifier) |
||
28 | } |
||
29 |