feat: bind signed rosters to assignments

This commit is contained in:
Josh Creek
2026-09-01 08:10:05 +01:00
parent 5b40bf9066
commit fec4f91672
3 changed files with 41 additions and 1 deletions
+5
View File
@@ -3,6 +3,8 @@ package store
import (
"testing"
"time"
"github.com/cosmic-clash/cosmic-clash/server/domain"
)
func TestAssignmentSQLBindsPlayerAndPreservesIdenticalReplay(t *testing.T) {
@@ -37,4 +39,7 @@ func TestAssignmentStoreRejectsInvalidBatches(t *testing.T) {
if err := SaveAssignments(nil, nil, []DurableAssignment{{MatchID: "match-1", PlayerID: "player-1"}}); err == nil {
t.Fatal("invalid assignment batch accepted")
}
if err := SaveVerifiedAssignmentRoster(nil, nil, domain.Assignment{}, nil); err == nil {
t.Fatal("empty verified roster accepted")
}
}