Files
ahp d9a2abb44f feat: release v0.1.3 chat, profiles, and media
Keep read receipts for the other person only, and let photos, voice, and files stay cached until they are actually replaced.
2026-10-09 19:05:59 +03:30

37 lines
741 B
Go

package store_test
import (
"context"
"os"
"testing"
"pargar/backend/internal/db"
"pargar/backend/internal/store"
)
func TestLearningOverviewSmoke(t *testing.T) {
dsn := os.Getenv("DATABASE_URL")
if dsn == "" {
dsn = "postgres://pargar:f479ad70f076f25594b73b767691be4b295901c4430ed208@localhost:5432/pargar?sslmode=disable"
}
ctx := context.Background()
pool, err := db.Connect(ctx, dsn)
if err != nil {
t.Skip("postgres unavailable:", err)
}
defer pool.Close()
st := store.New(pool)
o, err := st.LearningOverview(ctx)
if err != nil {
t.Fatal(err)
}
if o == nil {
t.Fatal("nil overview")
}
students, _, err := st.ListStudentLearning(ctx, "", "", "xp", 10, 0)
if err != nil {
t.Fatal(err)
}
_ = students
}