test: war relations on a new game

This commit is contained in:
Ilia Denisov
2025-09-30 20:46:20 +03:00
parent 04fc96dc8f
commit c6ccc2df9f
+2
View File
@@ -6,6 +6,7 @@ import (
"testing" "testing"
"github.com/google/uuid" "github.com/google/uuid"
"github.com/iliadenisov/galaxy/pkg/model/game"
"github.com/iliadenisov/galaxy/pkg/repo" "github.com/iliadenisov/galaxy/pkg/repo"
"github.com/iliadenisov/galaxy/pkg/util" "github.com/iliadenisov/galaxy/pkg/util"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
@@ -44,6 +45,7 @@ func TestNewGame(t *testing.T) {
if g.Race[r].Relations[i].RaceID == g.Race[r].ID { if g.Race[r].Relations[i].RaceID == g.Race[r].ID {
assert.Fail(t, "race relation with itself") assert.Fail(t, "race relation with itself")
} }
assert.Equal(t, game.RelationWar, g.Race[r].Relations[i].Relation)
} }
} }