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) } }