Files
walker/htmlschema/groups_test.go
T
2020-06-19 14:18:47 +02:00

23 lines
546 B
Go

package htmlschema
import (
"os"
"path/filepath"
"testing"
"github.com/stretchr/testify/assert"
)
func TestGroupValidator(t *testing.T) {
gv, errGV := NewGroupValidator(filepath.Join(getSchemaDir(), "groups"))
if errGV != nil {
t.Error(errGV)
}
schemaCatalogueProduct := gv.getSchemaForGroup("catalogue/product")
assert.NotNil(t, schemaCatalogueProduct)
report, errValidate := gv.Validate("catalogue/product", []byte(`<html></html>`), os.Stdout)
assert.NoError(t, errValidate)
assert.NotNil(t, report)
report.Print(os.Stdout)
}