You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
348 B
Go
24 lines
348 B
Go
package util
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestGetGitHome(t *testing.T) {
|
|
homeDir, err := os.UserHomeDir()
|
|
if err != nil {
|
|
return
|
|
}
|
|
actual, err := GetGitHome()
|
|
if err != nil {
|
|
return
|
|
}
|
|
|
|
expected := filepath.Join(homeDir, goctlDir, gitDir)
|
|
assert.Equal(t, expected, actual)
|
|
}
|