Skip to content

Commit d6b37be

Browse files
nguyerawrichar
authored andcommitted
Update webhook unit test
Signed-off-by: Nicko Guyer <[email protected]>
1 parent 4f3a2ba commit d6b37be

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
@@ -703,6 +703,8 @@ func TestWebhookFailFastAsk(t *testing.T) {
703703
func TestDeliveryRequestNilMessage(t *testing.T) {
704704
wh, cancel := newTestWebHooks(t)
705705
defer cancel()
706+
mcb := wh.callbacks["ns1"].(*eventsmocks.Callbacks)
707+
mcb.On("DeliveryResponse", mock.Anything, mock.Anything).Return("", &core.EventDelivery{})
706708

707709
yes := true
708710
sub := &core.Subscription{
@@ -729,6 +731,7 @@ func TestDeliveryRequestNilMessage(t *testing.T) {
729731

730732
err := wh.DeliveryRequest(mock.Anything, sub, event, nil)
731733
assert.NoError(t, err)
734+
mcb.AssertExpectations(t)
732735
}
733736

734737
func TestDeliveryRequestReplyToReply(t *testing.T) {

0 commit comments

Comments
 (0)