mirror of
https://github.com/gin-gonic/gin.git
synced 2025-07-15 04:00:21 +08:00
Adds StaticFile()
This commit is contained in:
@ -87,3 +87,14 @@ func performRequestInGroup(t *testing.T, method string) {
|
||||
assert.Equal(t, w.Code, 400)
|
||||
assert.Equal(t, w.Body.String(), "the method was "+method+" and index 1")
|
||||
}
|
||||
|
||||
func TestRouterGroupInvalidStaticFile(t *testing.T) {
|
||||
router := New()
|
||||
assert.Panics(t, func() {
|
||||
router.StaticFile("/path/:param", "favicon.ico")
|
||||
})
|
||||
|
||||
assert.Panics(t, func() {
|
||||
router.StaticFile("/path/*param", "favicon.ico")
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user