added code that checks vendor folders

This commit is contained in:
Mat Ryer
2017-07-11 20:42:36 +01:00
parent 63b6f24493
commit 2abe0a029a
4 changed files with 58 additions and 11 deletions

View File

@@ -2,7 +2,6 @@ package moq
import (
"bytes"
"log"
"strings"
"testing"
)
@@ -183,5 +182,14 @@ func TestVendoredPackages(t *testing.T) {
if err != nil {
t.Errorf("mock error: %s", err)
}
log.Println(buf.String())
s := buf.String()
// assertions of things that should be mentioned
var strs = []string{
`"github.com/matryer/somerepo"`,
}
for _, str := range strs {
if !strings.Contains(s, str) {
t.Errorf("expected but missing: \"%s\"", str)
}
}
}