ZDDC/zddc/internal/handler/projecthandler_test.go
2026-06-11 13:32:31 -05:00

19 lines
461 B
Go

package handler
import "testing"
func TestIsProjectRootURL(t *testing.T) {
cases := map[string]bool{
"/Project-1": true,
"/Project_2": true,
"/Project-1/": false, // trailing slash
"/Project-1/x": false, // deeper
"/": false, // deployment root
"": false,
}
for path, want := range cases {
if got := IsProjectRootURL(path); got != want {
t.Errorf("IsProjectRootURL(%q) = %v, want %v", path, got, want)
}
}
}