- 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.
24 lines
657 B
Go
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")
|
|
}
|
|
}
|