Skip to content

Commit

Permalink
test must initialize http client
Browse files Browse the repository at this point in the history
  • Loading branch information
meomap committed Sep 9, 2018
1 parent 158505e commit 1e74eaa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scheduler/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package scheduler

import (
"context"
"errors"
"fmt"
"net/http"
"net/http/httptest"
Expand Down Expand Up @@ -276,3 +277,11 @@ func TestExecRequest(t *testing.T) {
})
}
}

func TestMustNewClient(t *testing.T) {
cli := Must(&HTTPClient{}, nil)
assert.NotNil(t, cli)
assert.Panics(t, func() {
Must(nil, errors.New("Can't create new client"))
})
}

0 comments on commit 1e74eaa

Please sign in to comment.