Housekeeping

Move docs and commands out into their own files
This commit is contained in:
Marc Di Luzio 2020-05-29 18:27:03 +01:00
parent b04eb8a04a
commit 73a1e1fd21
5 changed files with 3 additions and 3 deletions

View file

@ -0,0 +1,22 @@
package main
import (
"encoding/json"
"net/http"
"net/http/httptest"
"testing"
)
func TestHandleStatus(t *testing.T) {
request, _ := http.NewRequest(http.MethodGet, "/status", nil)
response := httptest.NewRecorder()
HandleStatus(response, request)
var status RouterStatus
json.NewDecoder(response.Body).Decode(&status)
if status.Ready != true {
t.Errorf("got false for /status")
}
}