1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-23 06:12:20 +00:00
ghostream/web/web_test.go

17 lines
327 B
Go
Raw Normal View History

2020-09-27 20:40:07 +00:00
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)
}
}