Skip to content

Commit

Permalink
added unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nate North committed Jun 2, 2024
1 parent cb68963 commit 7613a4b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions external_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package buzz_test
import (
"context"
"log"
"testing"

"github.com/thenorthnate/buzz"
)
Expand Down Expand Up @@ -31,3 +32,13 @@ func Example() {
// Some time later... during shutdown
hive.StopAll()
}

func TestNewTestCallChain(t *testing.T) {
middleware := func(ctx context.Context, chain *buzz.CallChain) error {
return nil
}
chain := buzz.NewTestCallChain(middleware)
if err := chain.Next(context.Background()); err != nil {
t.Fatal("got unexpected error ", err)
}
}

0 comments on commit 7613a4b

Please sign in to comment.