summaryrefslogtreecommitdiff
path: root/internal/cli/root_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cli/root_test.go')
-rw-r--r--internal/cli/root_test.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/cli/root_test.go b/internal/cli/root_test.go
index c900027..2b12514 100644
--- a/internal/cli/root_test.go
+++ b/internal/cli/root_test.go
@@ -12,8 +12,6 @@ import (
)
func TestRootVersionFlag(t *testing.T) {
- loadedConfig = CurrentConfig()
-
var out bytes.Buffer
cmd := NewRootCmd()
cmd.SetOut(&out)
@@ -51,7 +49,7 @@ func TestRootLoadsConfigInPersistentPreRun(t *testing.T) {
t.Fatalf("Execute() error = %v", err)
}
- cfg := CurrentConfig()
+ cfg := currentConfig(cmd)
if cfg.Hostname != "from-config" {
t.Fatalf("Hostname = %q, want %q", cfg.Hostname, "from-config")
}
@@ -116,7 +114,7 @@ func TestRootUsesDefaultConfigWhenNoFileExists(t *testing.T) {
t.Fatalf("Execute() error = %v", err)
}
- cfg := CurrentConfig()
+ cfg := currentConfig(cmd)
if cfg.WeekWorkHours != 40 {
t.Fatalf("WeekWorkHours = %v, want 40", cfg.WeekWorkHours)
}