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>
24 lines
406 B
Go
24 lines
406 B
Go
package entity
|
|
|
|
import "testing"
|
|
|
|
func TestNewQRCodeOpaque(t *testing.T) {
|
|
got, err := NewQRCode()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if !ValidQRCode(got) {
|
|
t.Fatalf("%s", got)
|
|
}
|
|
other, err := NewQRCode()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if got == other {
|
|
t.Fatal("not random")
|
|
}
|
|
if ValidQRCode("spark:u:1") || ValidQRCode("spark:q:zz") || ValidQRCode("") {
|
|
t.Fatal("invalid accepted")
|
|
}
|
|
}
|