mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-19 23:11:25 +02:00
feat(entrypoint): added CatchAll and NotFound rules and handler
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
package entrypoint
|
||||
package entrypoint_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/yusing/godoxy/internal/entrypoint"
|
||||
"github.com/yusing/godoxy/internal/route"
|
||||
"github.com/yusing/godoxy/internal/route/routes"
|
||||
|
||||
@@ -29,14 +30,14 @@ func run(t *testing.T, match []string, noMatch []string) {
|
||||
|
||||
for _, test := range match {
|
||||
t.Run(test, func(t *testing.T) {
|
||||
found := ep.findRouteFunc(test)
|
||||
found := ep.FindRoute(test)
|
||||
expect.NotNil(t, found)
|
||||
})
|
||||
}
|
||||
|
||||
for _, test := range noMatch {
|
||||
t.Run(test, func(t *testing.T) {
|
||||
found := ep.findRouteFunc(test)
|
||||
found := ep.FindRoute(test)
|
||||
expect.Nil(t, found)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user