1
0
mirror of https://gitlab.crans.org/nounous/ghostream.git synced 2025-06-29 21:31:07 +02:00

Use pkger to pack templates

This commit is contained in:
Alexandre Iooss
2020-09-28 17:36:40 +02:00
parent 92f44c981d
commit 7716898713
7 changed files with 58 additions and 4 deletions

View File

@ -7,10 +7,16 @@ import (
)
func TestViewerPageGET(t *testing.T) {
r, _ := http.NewRequest("GET", "", nil)
// Load templates
if err := loadTemplates(); err != nil {
t.Errorf("Failed to load templates: %v", err)
}
// Test GET request
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)
t.Errorf("Viewer page returned %v != %v on GET", w.Code, http.StatusOK)
}
}