Files
Proxy-PPC/NewProxy/routes/status_test.go
2025-11-02 12:01:20 +02:00

24 lines
394 B
Go

package routes
import (
"net/http"
"net/http/httptest"
"testing"
"github.com/gin-gonic/gin"
)
func TestStatusHandler(t *testing.T) {
gin.SetMode(gin.TestMode)
r := gin.Default()
RegisterStatusRoute(r)
req, _ := http.NewRequest("GET", "/status", nil)
w := httptest.NewRecorder()
r.ServeHTTP(w, req)
if w.Code != http.StatusOK {
t.Errorf("Expected 200 OK, got %d", w.Code)
}
}