pkger/pkging/mem/mem_test.go

28 lines
403 B
Go
Raw Normal View History

2019-09-03 18:29:28 +03:00
package mem
2019-09-01 00:00:24 +03:00
import (
2019-09-01 05:45:22 +03:00
"testing"
2019-09-01 00:00:24 +03:00
"github.com/markbates/pkger/here"
2019-09-03 18:29:28 +03:00
"github.com/markbates/pkger/pkging/pkgtest"
2019-09-01 05:45:22 +03:00
"github.com/stretchr/testify/require"
2019-09-01 00:00:24 +03:00
)
2019-09-03 18:29:28 +03:00
func Test_Pkger(t *testing.T) {
2019-09-01 05:45:22 +03:00
r := require.New(t)
info, err := here.Current()
r.NoError(err)
2019-09-01 06:29:25 +03:00
r.NotZero(info)
2019-09-01 05:45:22 +03:00
2019-09-02 01:05:54 +03:00
wh, err := New(info)
2019-09-01 05:45:22 +03:00
r.NoError(err)
2019-09-02 01:05:54 +03:00
WithInfo(wh, info)
2019-09-01 06:29:25 +03:00
2019-09-03 18:29:28 +03:00
suite, err := pkgtest.NewSuite(wh)
2019-09-01 05:45:22 +03:00
r.NoError(err)
2019-09-01 00:00:24 +03:00
2019-09-01 05:45:22 +03:00
suite.Test(t)
2019-09-01 00:00:24 +03:00
}