udemy-go-web-1/cmd/web/routes_test.go

22 lines
298 B
Go
Raw Normal View History

package main
import (
"go-udemy-web-1/internal/config"
"testing"
"github.com/go-chi/chi/v5"
)
func TestRoutes(t *testing.T) {
var app config.AppConfig
mux := routes(&app)
switch v := mux.(type) {
case *chi.Mux:
// do nothing
default:
t.Errorf("type is not *chi.Mux, is %T", v)
}
}