Commit 8294f0a3 authored by keks's avatar keks Committed by Jeromy

remove test for deleted fuction

License: MIT
Signed-off-by: default avatarkeks <keks@cryptoscope.co>
parent fbc36b89
......@@ -73,41 +73,3 @@ func TestCheckVersionOption(t *testing.T) {
}
}
}
func TestServerNameOption(t *testing.T) {
type testcase struct {
name string
}
tcs := []testcase{
{"go-ipfs/0.4.13"},
{"go-ipfs/" + config.CurrentVersionNumber},
}
assert := func(name string, exp, got interface{}) {
if got != exp {
t.Errorf("%s: got %q, expected %q", name, got, exp)
}
}
for _, tc := range tcs {
t.Logf("%#v", tc)
r := httptest.NewRequest("POST", "/", nil)
inner := http.NewServeMux()
inner.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
// this block is intentionally left blank.
})
mux, err := ServerNameOption(tc.name)(nil, nil, inner)
if err != nil {
t.Fatal(err)
}
w := httptest.NewRecorder()
mux.ServeHTTP(w, r)
srvHdr := w.Header().Get("Server")
assert("Server header", tc.name, srvHdr)
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment