Skip to content

Commit

Permalink
test: add Verbose case
Browse files Browse the repository at this point in the history
  • Loading branch information
dwisiswant0 committed Oct 3, 2023
1 parent 7444140 commit 9d92434
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions teler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,27 @@ func TestNewWithFalcoSidekickURL(t *testing.T) {
}
}

func TestNewWithVerbose(t *testing.T) {
// Initialize teler
telerMiddleware := New(Options{NoStderr: true, Verbose: true})
wrappedHandler := telerMiddleware.Handler(handler)

// Create a test server with the wrapped handler
ts := httptest.NewServer(wrappedHandler)
defer ts.Close()

// Create a request to send to the test server
req, err := http.NewRequest("GET", ts.URL, nil)
if err != nil {
t.Fatal(err)
}

_, err = client.Do(req)
if err != nil {
t.Fatal(err)
}
}

func TestNewCustomsFromFile(t *testing.T) {
// Initialize teler
telerMiddleware := New(Options{
Expand Down

0 comments on commit 9d92434

Please sign in to comment.