From 3eac94c70d8d3f544aa168d07984d056b682b1b3 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Thu, 5 Dec 2019 21:54:32 -0700 Subject: [PATCH] One more state test --- cmd/mothd/state_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/mothd/state_test.go b/cmd/mothd/state_test.go index 668ab7e..1849b07 100644 --- a/cmd/mothd/state_test.go +++ b/cmd/mothd/state_test.go @@ -59,4 +59,12 @@ func TestState(t *testing.T) { } else if (pl[0].TeamId != teamId) || (pl[0].Category != category) || (pl[0].Points != points) { t.Errorf("Incorrect logged award %v", pl) } + + fs.Remove("initialized") + s.Cleanup() + + pl = s.PointsLog() + if len(pl) != 0 { + t.Errorf("After reinitialization, points log has length %d", len(pl)) + } }