Fix test server to TestGetBlocks

This commit is contained in:
178inaba 2017-04-15 04:09:33 +09:00
parent 920eb1ad5a
commit d61ce1c241

View File

@ -9,10 +9,6 @@ import (
func TestGetBlocks(t *testing.T) { func TestGetBlocks(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/api/v1/blocks" {
http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)
return
}
fmt.Fprintln(w, `[{"Username": "foo"}, {"Username": "bar"}]`) fmt.Fprintln(w, `[{"Username": "foo"}, {"Username": "bar"}]`)
return return
})) }))