vinegar/servlet/server_test.go
2023-07-31 16:57:21 -04:00

25 lines
356 B
Go

package servlet
import (
"testing"
)
func TestNewServlet(t *testing.T) {
port := ":8080"
srv := NewServlet(port)
if srv.Port != port {
t.Errorf("Expected port %s, got %s", port, srv.Port)
}
if srv.Routes != nil {
t.Error("Expected Routes to be nil")
}
if srv.ErrorRoutes == nil {
t.Error("Expected ErrorRoutes to be initialized")
}
}