Skip to content

Commit d1c613c

Browse files
committed
Update webhook unit test
Signed-off-by: Nicko Guyer <[email protected]>
1 parent 2d48b16 commit d1c613c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/events/webhooks/webhooks_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,8 @@ func TestWebhookFailFastAsk(t *testing.T) {
715715
func TestDeliveryRequestNilMessage(t *testing.T) {
716716
wh, cancel := newTestWebHooks(t)
717717
defer cancel()
718+
mcb := wh.callbacks["ns1"].(*eventsmocks.Callbacks)
719+
mcb.On("DeliveryResponse", mock.Anything, mock.Anything).Return("", &core.EventDelivery{})
718720

719721
yes := true
720722
sub := &core.Subscription{
@@ -741,6 +743,7 @@ func TestDeliveryRequestNilMessage(t *testing.T) {
741743

742744
err := wh.DeliveryRequest(mock.Anything, sub, event, nil)
743745
assert.NoError(t, err)
746+
mcb.AssertExpectations(t)
744747
}
745748

746749
func TestDeliveryRequestReplyToReply(t *testing.T) {

0 commit comments

Comments
 (0)