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) {
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{}