test: war relations on a new game
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user