We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09dc51f commit 8ccd05aCopy full SHA for 8ccd05a
casbin_test.go
@@ -377,3 +377,23 @@ func TestJWTWithConfig_Functions(t *testing.T) {
377
})
378
}
379
380
+
381
+func TestJWTWithConfig_Skipper(t *testing.T) {
382
+ e := echo.New()
383
384
+ e.GET("/", func(c echo.Context) error {
385
+ return c.JSON(http.StatusOK, "ok")
386
+ })
387
388
+ e.Use(CasbinWithConfig(Config{
389
+ Enforcer: enforcer,
390
+ Skipper: func(c echo.Context) bool { return true },
391
+ }))
392
393
+ req := httptest.NewRequest(http.MethodGet, "/", nil)
394
+ resp := httptest.NewRecorder()
395
396
+ e.ServeHTTP(resp, req)
397
398
+ assert.Equal(t, http.StatusOK, resp.Code)
399
+}
codecov.yml
@@ -0,0 +1,4 @@
1
+coverage:
2
+ range: 50..75
3
+ round: down
4
+ precision: 2
0 commit comments