Test: qiniu handler get token

This commit is contained in:
HFO4
2020-01-15 11:03:26 +08:00
parent e8d21b1e9b
commit 534e127f87
5 changed files with 164 additions and 67 deletions

View File

@ -164,3 +164,11 @@ func TestPolicy_GetUploadURL(t *testing.T) {
}
}
func TestPolicy_IsPathGenerateNeeded(t *testing.T) {
asserts := assert.New(t)
policy := Policy{Type: "qiniu"}
asserts.True(policy.IsPathGenerateNeeded())
policy.Type = "remote"
asserts.False(policy.IsPathGenerateNeeded())
}