初始化
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// Package storage 验证腾讯云 COS 对象键扩展名处理规则。
|
||||
package storage
|
||||
|
||||
import "testing"
|
||||
|
||||
// TestKeyWithContentTypeMatchesActualMedia 验证远端媒体类型会覆盖错误扩展名。
|
||||
func TestKeyWithContentTypeMatchesActualMedia(t *testing.T) {
|
||||
if got := keyWithContentType("folder/result.png", "image/webp"); got != "folder/result.webp" {
|
||||
t.Fatalf("got %s", got)
|
||||
}
|
||||
if got := keyWithContentType("folder/result.mp4", "video/quicktime"); got != "folder/result.mov" {
|
||||
t.Fatalf("got %s", got)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user