summaryrefslogtreecommitdiff
path: root/internal/askcli/command_write_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-18 08:05:32 +0300
committerPaul Buetow <paul@buetow.org>2026-06-18 08:05:32 +0300
commita80ad2b4691d0df63f68c6977ee18444e7bb752f (patch)
tree6edc47fcc3c929856826432cf3df3394a14934e8 /internal/askcli/command_write_test.go
parent4ffb22e7f69f1c9c79b095d4e60bad3d97aac55b (diff)
ik0 replace remaining test seams with DI
Diffstat (limited to 'internal/askcli/command_write_test.go')
-rw-r--r--internal/askcli/command_write_test.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/internal/askcli/command_write_test.go b/internal/askcli/command_write_test.go
index e922920..453b005 100644
--- a/internal/askcli/command_write_test.go
+++ b/internal/askcli/command_write_test.go
@@ -5,7 +5,6 @@ import (
"context"
"errors"
"io"
- "path/filepath"
"strings"
"testing"
"time"
@@ -15,15 +14,8 @@ func useIsolatedTaskAliasCache(t *testing.T) time.Time {
t.Helper()
dir := t.TempDir()
- oldRoot := taskAliasCacheRoot
- oldNow := nowTaskAliasCache
fixedNow := time.Date(2026, 3, 26, 12, 0, 0, 0, time.UTC)
- taskAliasCacheRoot = func() (string, error) { return filepath.Join(dir, "hexai"), nil }
- nowTaskAliasCache = func() time.Time { return fixedNow }
- t.Cleanup(func() {
- taskAliasCacheRoot = oldRoot
- nowTaskAliasCache = oldNow
- })
+ t.Setenv("XDG_CACHE_HOME", dir)
return fixedNow
}