remove unnecessary code
This commit is contained in:
parent
a198442338
commit
18e4084fab
|
|
@ -199,15 +199,7 @@ func (c *mockHttpClient) Do(req *http.Request) (*http.Response, error) {
|
|||
}
|
||||
|
||||
func TestHttpClientClose(t *testing.T) {
|
||||
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Header.Get("Authorization") != "Bearer "+token {
|
||||
t.Errorf("Authorization token is wrong or not provided")
|
||||
}
|
||||
w.WriteHeader(200)
|
||||
if _, err := fmt.Fprint(w, "{}"); err != nil {
|
||||
t.Errorf("Error writing teams api response %v", err)
|
||||
}
|
||||
}))
|
||||
ts := httptest.NewServer(nil)
|
||||
|
||||
api := NewTeamsAPI(ts.URL, logger)
|
||||
api.httpClient = &mockHttpClient{}
|
||||
|
|
|
|||
Loading…
Reference in New Issue