merged from gramsrv upstream
This commit is contained in:
parent
79c64ee916
commit
21a0856587
651 changed files with 54774 additions and 4590 deletions
|
|
@ -6,8 +6,17 @@ import (
|
|||
|
||||
"github.com/iamxvbaba/td/tg"
|
||||
"github.com/iamxvbaba/td/tgerr"
|
||||
|
||||
"telesrv/internal/domain"
|
||||
)
|
||||
|
||||
func TestFileSaveErrMapsStorageCapacityWithoutFloodWait(t *testing.T) {
|
||||
err := fileSaveErr(domain.ErrStorageFull)
|
||||
if !tgerr.Is(err, "STORAGE_FULL") {
|
||||
t.Fatalf("fileSaveErr = %v, want STORAGE_FULL", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestStorageFileTypePrefersMagicOverMime(t *testing.T) {
|
||||
webp := []byte{'R', 'I', 'F', 'F', 0, 0, 0, 0, 'W', 'E', 'B', 'P'}
|
||||
if _, ok := storageFileType("image/jpeg", webp).(*tg.StorageFileWebp); !ok {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue