This commit is contained in:
2026-09-17 02:47:00 +07:00
parent 87bd07019a
commit 2f54576a39
14 changed files with 297 additions and 236 deletions
@@ -13,7 +13,7 @@ import (
"evening_detective_server/internal/modules/email_sender"
"evening_detective_server/internal/repos/teams_repo"
"evening_detective_server/internal/services/game_service"
"evening_detective_server/internal/services/gameplay_service"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgxpool"
)
@@ -223,11 +223,11 @@ func TestParticipationPostgres(t *testing.T) {
t.Fatal("cancelled team in active list")
}
}
gameService := game_service.NewGameService(nil, repo, nil, nil, "", nil, nil, nil, nil)
if _, _, _, err := gameService.GetTeamActions(ctx, 3, "secret"); !errors.Is(err, teams_repo.ErrTeamNotFound) {
gameplayService := gameplay_service.NewGameplayService(nil, repo, nil, nil, nil, nil, nil, "")
if _, _, _, err := gameplayService.GetTeamActions(ctx, 3, "secret"); !errors.Is(err, teams_repo.ErrTeamNotFound) {
t.Fatalf("cancelled team got story: %v", err)
}
if err := gameService.AddTeamAction(ctx, 3, "secret", "anything", false); !errors.Is(err, teams_repo.ErrTeamNotFound) {
if err := gameplayService.AddTeamAction(ctx, 3, "secret", "anything", false); !errors.Is(err, teams_repo.ErrTeamNotFound) {
t.Fatalf("cancelled team added action: %v", err)
}
answerService := answer_service.NewAnswerService(nil, repo, nil, nil, nil)