mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-29 21:31:07 +02:00
Pack also statics during compilation
This commit is contained in:
@ -1,22 +0,0 @@
|
||||
package web
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestViewerPageGET(t *testing.T) {
|
||||
// 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 returned %v != %v on GET", w.Code, http.StatusOK)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user