package equipotest import ( "testing" "amadan.net/oficina/equipo/internal/equipo/team" ) func TestRunnerLostMarksUnknownAndCharges(t *testing.T) { f := runnerFixtureNew(t, true) id := eventTurn(t, f) q := f.request() q.ActionID = id q.RequestID = "lost" _, err := f.x.Mutate(connectionContext, f.principal, "lost", q) executionMust(t, err) a, err := f.x.Core.GetAction(connectionContext, q.Scope, id) executionMust(t, err) rows, err := f.x.Core.Reservations(connectionContext, q.Scope) executionMust(t, err) if a.State != team.ActionUncertain || len(rows) != 1 || rows[0].Settled != rows[0].Reserved { t.Fatal("lost action was not unknown and fully charged", a.State, rows) } }