2024-04-04 07:33:55 +00:00
|
|
|
package test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"fmt"
|
|
|
|
"go.uber.org/zap"
|
2024-11-25 08:14:01 +00:00
|
|
|
"gitea.pena/PenaSide/notifier/internal/clients"
|
|
|
|
"gitea.pena/PenaSide/notifier/internal/proto/notifyer"
|
2024-04-04 07:33:55 +00:00
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
func Test_GetQuizzes(t *testing.T) {
|
|
|
|
logger, _ := zap.NewProduction()
|
|
|
|
client := clients.NewQuizClient("localhost:9000", logger)
|
|
|
|
ctx := context.Background()
|
|
|
|
|
|
|
|
resp, err := client.GetQuizzes(ctx, ¬ifyer.GetQuizzesRequest{
|
|
|
|
AccountId: "64f2cd7a7047f28fdabf6d9e",
|
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
logger.Error("error", zap.Error(err))
|
|
|
|
}
|
|
|
|
fmt.Println(resp.QuizIds)
|
|
|
|
}
|
|
|
|
|
|
|
|
func Test_GetStartedQuizzes(t *testing.T) {
|
|
|
|
logger, _ := zap.NewProduction()
|
|
|
|
client := clients.NewQuizClient("localhost:9000", logger)
|
|
|
|
ctx := context.Background()
|
|
|
|
|
|
|
|
resp, err := client.GetStartedQuizzes(ctx, ¬ifyer.GetStartedQuizzesRequest{
|
|
|
|
AccountId: "64f2cd7a7047f28fdabf6d9e",
|
|
|
|
})
|
|
|
|
if err != nil {
|
|
|
|
logger.Error("error", zap.Error(err))
|
|
|
|
}
|
|
|
|
fmt.Println(resp.QuizIds)
|
|
|
|
}
|