test: add new handler test files for analytics, auth, kobo, library, progress, and sidecar

This commit is contained in:
2026-02-14 21:38:08 -05:00
parent acd194c217
commit 6346e9bc27
7 changed files with 362 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
package handlers
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestGetDeviceIcon_Kobo(t *testing.T) {
result := getDeviceIcon("kobo")
assert.Equal(t, "📚", result)
}
func TestGetDeviceIcon_KOReader(t *testing.T) {
result := getDeviceIcon("koreader")
assert.Equal(t, "📖", result)
}
func TestGetDeviceIcon_Kindle(t *testing.T) {
result := getDeviceIcon("kindle")
assert.Equal(t, "📱", result)
}
func TestGetDeviceIcon_Unknown(t *testing.T) {
result := getDeviceIcon("unknown")
assert.Equal(t, "📚", result)
result = getDeviceIcon("")
assert.Equal(t, "📚", result)
}