test: add MakeTestState helper function

This commit is contained in:
Grail Finder
2025-05-03 08:55:48 +03:00
committed by Grail Finder (aider)
parent 78b48b8c71
commit 8b9c440ae5

View File

@ -1,5 +1,7 @@
package models
import "time"
type (
UserTeam string
UserRole string
@ -42,4 +44,21 @@ type UserState struct {
Username string
Room RoomPublic
Team UserTeam
Role UserRole
}
func MakeTestState() *UserState {
cards := []WordCard{
{Word: "hamster", Color: "blue"}, // help to fill wordcards based on roundWords; ai!
}
room := RoomPublic{
ID: "test-id",
CreatedAt: time.Now(),
CreatorName: "test-name",
}
return &UserState{
Username: "test-name",
Team: UserTeamNone,
Role: UserRoleNone,
}
}