@@ -10,6 +10,7 @@ import (
10
10
"time"
11
11
12
12
"github.com/google/uuid"
13
+ "github.com/stretchr/testify/assert"
13
14
"github.com/stretchr/testify/require"
14
15
15
16
"cdr.dev/slog"
@@ -54,14 +55,14 @@ func TestWebhook(t *testing.T) {
54
55
serverFn : func (msgID uuid.UUID , w http.ResponseWriter , r * http.Request ) {
55
56
var payload dispatch.WebhookPayload
56
57
err := json .NewDecoder (r .Body ).Decode (& payload )
57
- require .NoError (t , err )
58
- require .Equal (t , "application/json" , r .Header .Get ("Content-Type" ))
59
- require .Equal (t , msgID , payload .MsgID )
60
- require .Equal (t , msgID .String (), r .Header .Get ("X-Message-Id" ))
58
+ assert .NoError (t , err )
59
+ assert .Equal (t , "application/json" , r .Header .Get ("Content-Type" ))
60
+ assert .Equal (t , msgID , payload .MsgID )
61
+ assert .Equal (t , msgID .String (), r .Header .Get ("X-Message-Id" ))
61
62
62
63
w .WriteHeader (http .StatusOK )
63
64
_ , err = w .Write ([]byte (fmt .Sprintf ("received %s" , payload .MsgID )))
64
- require .NoError (t , err )
65
+ assert .NoError (t , err )
65
66
},
66
67
expectSuccess : true ,
67
68
},
0 commit comments