1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2024-12-23 00:22:19 +00:00

Test viewer page

This commit is contained in:
Alexandre Iooss 2020-09-27 22:40:07 +02:00
parent 6c7ac2d3b3
commit 503fb2698b
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02

16
web/web_test.go Normal file
View File

@ -0,0 +1,16 @@
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)
}
}