1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-22 20:52:20 +00:00
ghostream/web/web_test.go
2020-09-27 22:40:07 +02:00

17 lines
327 B
Go

package web
import (
"net/http"
"net/http/httptest"
"testing"
)
func TestViewerPageGET(t *testing.T) {
r, _ := http.NewRequest("GET", "", nil)
w := httptest.NewRecorder()
http.HandlerFunc(viewerHandler).ServeHTTP(w, r)
if w.Code != http.StatusOK {
t.Errorf("Viewer page didn't return %v on GET", http.StatusOK)
}
}