21 lines
831 B
Go
21 lines
831 B
Go
package seatdef_test
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"git.novox.be/novox/mesh-sdk/go/catalogue"
|
|
"git.novox.be/novox/mesh-sdk/go/seatdef"
|
|
)
|
|
|
|
// (An external test: the catalogue reads definitions, so seatdef's own tests cannot import it.)
|
|
// TestTheTemplatesAreTheCataloguesSix holds this reader's list of templates equal to the one a module's `requires`
|
|
// entry takes (ADR 0595 §2), so a seventh template cannot be added to one and not the other.
|
|
func TestTheTemplatesAreTheCataloguesSix(t *testing.T) {
|
|
want := []string{catalogue.TemplateState, catalogue.TemplateEvents, catalogue.TemplateWorkQueue,
|
|
catalogue.TemplateLog, catalogue.TemplateObjects, catalogue.TemplateLedger}
|
|
if strings.Join(seatdef.Templates, ",") != strings.Join(want, ",") {
|
|
t.Errorf("templates %v, the catalogue's %v", seatdef.Templates, want)
|
|
}
|
|
}
|