oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package equipotest
2
3import (
4 "testing"
5
6 "amadan.net/oficina/equipo/internal/equipo/team"
7)
8
9func TestRunnerLostMarksUnknownAndCharges(t *testing.T) {
10 f := runnerFixtureNew(t, true)
11 id := eventTurn(t, f)
12 q := f.request()
13 q.ActionID = id
14 q.RequestID = "lost"
15 _, err := f.x.Mutate(connectionContext, f.principal, "lost", q)
16 executionMust(t, err)
17 a, err := f.x.Core.GetAction(connectionContext, q.Scope, id)
18 executionMust(t, err)
19 rows, err := f.x.Core.Reservations(connectionContext, q.Scope)
20 executionMust(t, err)
21 if a.State != team.ActionUncertain || len(rows) != 1 || rows[0].Settled != rows[0].Reserved {
22 t.Fatal("lost action was not unknown and fully charged", a.State, rows)
23 }
24}
25