notifier/test/core_test.go
2024-04-04 10:33:55 +03:00

39 lines
889 B
Go

package test
import (
"context"
"fmt"
"go.uber.org/zap"
"mailnotifier/internal/clients"
"mailnotifier/internal/proto/notifyer"
"testing"
)
func Test_GetQuizzes(t *testing.T) {
logger, _ := zap.NewProduction()
client := clients.NewQuizClient("localhost:9000", logger)
ctx := context.Background()
resp, err := client.GetQuizzes(ctx, &notifyer.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, &notifyer.GetStartedQuizzesRequest{
AccountId: "64f2cd7a7047f28fdabf6d9e",
})
if err != nil {
logger.Error("error", zap.Error(err))
}
fmt.Println(resp.QuizIds)
}