remove unnecessary code

This commit is contained in:
Murat Kabilov 2017-06-09 11:39:49 +02:00
parent a198442338
commit 18e4084fab
1 changed files with 1 additions and 9 deletions

View File

@ -199,15 +199,7 @@ func (c *mockHttpClient) Do(req *http.Request) (*http.Response, error) {
} }
func TestHttpClientClose(t *testing.T) { func TestHttpClientClose(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ts := httptest.NewServer(nil)
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)
}
}))
api := NewTeamsAPI(ts.URL, logger) api := NewTeamsAPI(ts.URL, logger)
api.httpClient = &mockHttpClient{} api.httpClient = &mockHttpClient{}