test: add new handler test files for analytics, auth, kobo, library, progress, and sidecar
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user