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:
parent
6c7ac2d3b3
commit
503fb2698b
16
web/web_test.go
Normal file
16
web/web_test.go
Normal 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)
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user