mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-11-01 19:13:39 +08:00
Fix: policy should be re-dispatch while getting thumbnails
This commit is contained in:
@ -166,3 +166,21 @@ func TestGetSiteURL(t *testing.T) {
|
||||
asserts.Equal("https://cloudreve.org", siteURL.String())
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetIntSetting(t *testing.T) {
|
||||
asserts := assert.New(t)
|
||||
|
||||
// 正常
|
||||
{
|
||||
cache.Set("setting_TestGetIntSetting", "10", 0)
|
||||
res := GetIntSetting("TestGetIntSetting", 20)
|
||||
asserts.Equal(10, res)
|
||||
}
|
||||
|
||||
// 使用默认值
|
||||
{
|
||||
res := GetIntSetting("TestGetIntSetting_2", 20)
|
||||
asserts.Equal(20, res)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user