Codebase list golang-github-gobuffalo-packr / f5ff8065-4b79-4dca-9258-00633303cb2a/upstream builder / visitor_test.go
f5ff8065-4b79-4dca-9258-00633303cb2a/upstream

Tree @f5ff8065-4b79-4dca-9258-00633303cb2a/upstream (Download .tar.gz)

visitor_test.go @f5ff8065-4b79-4dca-9258-00633303cb2a/upstreamraw · history · blame

package builder

import (
	"testing"

	"github.com/stretchr/testify/require"
)

func Test_Visitor(t *testing.T) {
	r := require.New(t)
	v := newVisitor("../example/example.go")
	r.NoError(v.Run())

	r.Equal("example", v.Package)
	r.Len(v.Errors, 0)
	r.Len(v.Boxes, 7)
	r.Equal([]string{"./assets", "./bar", "./constant", "./foo", "./sf", "./templates", "./variable"}, v.Boxes)
}