ultisuite-backend/internal/users/avatar_test.go
R3D347HR4Y 1d063237b9
Some checks are pending
CI / Go tests (push) Waiting to run
CI / Integration tests (push) Waiting to run
CI / DB migrations (push) Waiting to run
feat(transcription): integrate Faster Whisper for Jitsi transcriptions
- Added support for Faster Whisper transcription via Jigasi and Skynet.
- Updated .env.example to include new environment variables for transcription settings.
- Enhanced Jitsi Docker Compose configuration to include Skynet and Jigasi services.
- Introduced new API endpoints for managing organizational folders in the drive service.
- Updated Nextcloud initialization script to enable external file mounting.
- Improved error handling and response structures in the drive API.
- Added new properties for organization settings related to transcription and agenda management.
2026-06-12 19:10:18 +02:00

24 lines
657 B
Go

package users
import "testing"
func TestNormalizeAvatarURL(t *testing.T) {
tinyPNG := "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="
got, err := normalizeAvatarURL(tinyPNG)
if err != nil {
t.Fatalf("normalizeAvatarURL() error = %v", err)
}
if got != tinyPNG {
t.Fatalf("normalizeAvatarURL() = %q, want %q", got, tinyPNG)
}
if _, err := normalizeAvatarURL("not-a-data-uri"); err == nil {
t.Fatal("expected error for invalid avatar")
}
if _, err := normalizeAvatarURL("data:text/plain;base64,YQ=="); err == nil {
t.Fatal("expected error for non-image mime")
}
}