Fixed one more test to be compatible with go modules
@@ -6,20 +6,20 @@ import (
"testing"
"github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
)
func TestNewFileSystemRepository(t *testing.T) {
wd, err := os.Getwd()
assert.NoError(t, err)
- assert.Contains(t, wd, "github.com/hellofresh/janus")
- // .../github.com/hellofresh/janus/pkg/api/../../assets/auth
+ // ./../../assets/auth
exampleAPIsPath := filepath.Join(wd, "..", "..", "..", "assets", "stubs", "auth")
info, err := os.Stat(exampleAPIsPath)
- assert.NoError(t, err)
- assert.True(t, info.IsDir())
+ require.NoError(t, err)
+ require.True(t, info.IsDir())
fsRepo, err := NewFileSystemRepository(exampleAPIsPath)
- assert.NoError(t, err)
+ require.NoError(t, err)
assert.NotNil(t, fsRepo)
}
