Fix test error

This commit is contained in:
杨成锴 2022-10-12 16:24:27 +08:00 committed by GitHub
parent c8d47d5b4a
commit aee734769d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -80,6 +80,9 @@ func TestDisablingWrapHandler(t *testing.T) {
router := gin.New()
disablingKey := "SWAGGER_DISABLE"
doc := &mockedSwag{}
swag.Register(swag.Name, doc)
router.GET("/simple/*any", DisablingWrapHandler(swaggerFiles.Handler, disablingKey))
assert.Equal(t, http.StatusOK, performRequest(http.MethodGet, "/simple/index.html", router).Code)