mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
19 lines
365 B
Go
19 lines
365 B
Go
package memory
|
|
|
|
import "testing"
|
|
|
|
func TestBuildQdrantFilter(t *testing.T) {
|
|
t.Parallel()
|
|
|
|
filter := buildQdrantFilter(map[string]interface{}{
|
|
"userId": "u1",
|
|
"score": map[string]interface{}{"gte": 0.5},
|
|
})
|
|
if filter == nil {
|
|
t.Fatalf("expected filter")
|
|
}
|
|
if len(filter.Must) != 2 {
|
|
t.Fatalf("expected two conditions, got %d", len(filter.Must))
|
|
}
|
|
}
|