spark-server/internal/module/user/entity/spark_id_test.go
zhr ae9a71034d feat: implement Spark IM V3 modular monolith
Add HTTP /v1 MVC, TCP send path, groups with server-side member-avatar collage, object-storage upload, and friends/favorites around the architecture-v3 layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-17 19:52:11 +08:00

15 lines
336 B
Go

package entity
import "testing"
func TestDefaultSparkID(t *testing.T) {
a := DefaultSparkID(100)
b := DefaultSparkID(101)
if !ValidSparkID(a) || !ValidSparkID(b) || a == b || a[0] != 's' {
t.Fatalf("%s %s", a, b)
}
if !ValidSparkID("alice_01") || ValidSparkID("1abcde") || ValidSparkID("ab") {
t.Fatal("spark_id regex")
}
}