added low test

This commit is contained in:
pasha1coil 2025-04-25 18:11:36 +03:00
parent 7f57d8c289
commit 467907d391

@ -0,0 +1,30 @@
package integration
import (
"context"
"fmt"
"gitea.pena/SQuiz/common/dal"
"testing"
)
func Test_GetQuestionList(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
d, err := dal.New(ctx, "host=localhost port=35432 user=squiz password=Redalert2 dbname=squiz sslmode=disable", nil)
if err != nil {
t.Fatal(err)
}
defer d.Close()
limit := int32(10)
offset := int32(1000)
list, count, err := d.QuestionRepo.GetQuestionsAI(ctx, 1308, "", limit, offset)
if err != nil {
t.Fatal(err)
}
fmt.Println(list)
fmt.Println(count)
}