go-scopes/tests/matrix_test.go

23 lines
488 B
Go

package scopes
import (
"os"
tbase "testing"
"git.sr.ht/~cco/go-scopes/common/testing"
"git.sr.ht/~cco/go-scopes/tests/etc"
)
func TestMatrixApp(tb *tbase.T) {
logfile := "log/matrix.log"
os.Remove(logfile) // make sure we start with a fresh log file
t := testing.SetUpApp(tb, etc.ConfigMx())
t.Run("app-matrix", MxTest)
t.TearDownApp("matrix")
t.AssertEqual(t.LogCheck(logfile, true), 3)
}
func MxTest(t *testing.T) {
ctx := t.Ctx
t.AssertEqual(len(ctx.Services()), 2)
}