[PATCH] Made tests independent from package path

The test case checked for a whole package path, which should exist in a generated moq file, but that failed for obvious reasons in forks
This commit is contained in:
Frederik Vosberg 2017-07-27 21:05:01 +02:00
parent df933a7865
commit 10bc283502

View File

@ -210,7 +210,7 @@ func TestDotImports(t *testing.T) {
t.Errorf("mock error: %s", err)
}
s := buf.String()
if !strings.Contains(s, `"github.com/matryer/moq/pkg/moq/testpackages/dotimport"`) {
if !strings.Contains(s, `/moq/pkg/moq/testpackages/dotimport"`) {
t.Error("contains invalid dot import")
}
}