This reverts commit 31d313c6a9.
This commit is contained in:
parent
80ab07e86e
commit
cf3d8636e2
1 changed files with 0 additions and 26 deletions
|
|
@ -1,26 +0,0 @@
|
||||||
package repositories_test
|
|
||||||
|
|
||||||
import (
|
|
||||||
"slices"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"git-repo-updater/internal/utils"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestIsIgnoredRepo(t *testing.T) {
|
|
||||||
ignored := []string{"~/Code/skip-me"}
|
|
||||||
repoPath := "/home/opdavies/Code/skip-me"
|
|
||||||
|
|
||||||
var expandedIgnored []string
|
|
||||||
|
|
||||||
for _, path := range ignored {
|
|
||||||
e, _ := utils.ExpandPath(path)
|
|
||||||
expandedIgnored = append(expandedIgnored, e)
|
|
||||||
}
|
|
||||||
|
|
||||||
isIgnored := slices.Contains(expandedIgnored, repoPath)
|
|
||||||
|
|
||||||
if !isIgnored {
|
|
||||||
t.Errorf("expected repo %s to be ignored, but it was not", repoPath)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue