31 lines
611 B
Go
31 lines
611 B
Go
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)
|
|
}
|