mirror of
https://github.com/gofiber/fiber.git
synced 2025-02-23 19:04:05 +00:00
Merge pull request #1094 from kiyonlin/test-case
👷 Add test cases for group router empty prefix path
This commit is contained in:
commit
0ccccb733e
@ -808,6 +808,9 @@ func Test_App_Group(t *testing.T) {
|
||||
grp.All("/ALL", dummyHandler)
|
||||
testStatus200(t, app, "/test/ALL", MethodPost)
|
||||
|
||||
grp.Use(dummyHandler)
|
||||
testStatus200(t, app, "/test/oke", MethodGet)
|
||||
|
||||
grp.Use("/USE", dummyHandler)
|
||||
testStatus200(t, app, "/test/USE/oke", MethodGet)
|
||||
|
||||
|
@ -158,6 +158,9 @@ func Test_Utils_getGroupPath(t *testing.T) {
|
||||
|
||||
res = getGroupPath("/v1/api", "group")
|
||||
utils.AssertEqual(t, "/v1/api/group", res)
|
||||
|
||||
res = getGroupPath("/v1/api", "")
|
||||
utils.AssertEqual(t, "/v1/api", res)
|
||||
}
|
||||
|
||||
// go test -v -run=^$ -bench=Benchmark_Utils_ -benchmem -count=3
|
||||
|
Loading…
x
Reference in New Issue
Block a user