add HEAD /ping test

pull/1597/head
Cory LaNou 2015-02-12 17:46:39 -07:00
parent d6800dde0d
commit 9ca976df39
1 changed files with 12 additions and 0 deletions

View File

@ -548,6 +548,18 @@ func TestHandler_Ping(t *testing.T) {
}
}
func TestHandler_PingHead(t *testing.T) {
srvr := OpenAuthlessServer(NewMessagingClient())
s := NewHTTPServer(srvr)
defer s.Close()
status, _ := MustHTTP("HEAD", s.URL+`/ping`, nil, nil, "")
if status != http.StatusNoContent {
t.Fatalf("unexpected status: %d", status)
}
}
func TestHandler_Users_NoUsers(t *testing.T) {
srvr := OpenAuthlessServer(NewMessagingClient())
srvr.CreateDatabase("foo")