mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
test: fix failed test
This commit is contained in:
@@ -76,3 +76,12 @@ func TestIsFunctionEnabled(t *testing.T) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestCacheControl(t *testing.T) {
|
||||
a := assert.New(t)
|
||||
TestFunc := CacheControl()
|
||||
rec := httptest.NewRecorder()
|
||||
c, _ := gin.CreateTestContext(rec)
|
||||
TestFunc(c)
|
||||
a.Contains(c.Writer.Header().Get("Cache-Control"), "no-cache")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user