@@ -109,7 +109,7 @@ func TestListCommand_CommandConstruction(t *testing.T) {
109109 cmd := & cli.Command {}
110110
111111 cfg := & config.Config {
112- Defaults : config.Defaults {BaseDir : "../worktrees" },
112+ Defaults : config.Defaults {BaseDir : config . DefaultBaseDir },
113113 }
114114 err := listCommandWithCommandExecutor (cmd , & buf , mockExec , cfg , "/test/repo" )
115115
@@ -178,7 +178,7 @@ func TestListCommand_Output(t *testing.T) {
178178 cmd := & cli.Command {}
179179
180180 cfg := & config.Config {
181- Defaults : config.Defaults {BaseDir : "../worktrees" },
181+ Defaults : config.Defaults {BaseDir : config . DefaultBaseDir },
182182 }
183183 err := listCommandWithCommandExecutor (cmd , & buf , mockExec , cfg , "/test/repo" )
184184
@@ -223,7 +223,7 @@ func TestListCommand_ExecutionError(t *testing.T) {
223223 cmd := & cli.Command {}
224224
225225 cfg := & config.Config {
226- Defaults : config.Defaults {BaseDir : "../worktrees" },
226+ Defaults : config.Defaults {BaseDir : config . DefaultBaseDir },
227227 }
228228 err := listCommandWithCommandExecutor (cmd , & buf , mockExec , cfg , "/test/repo" )
229229
@@ -245,7 +245,7 @@ func TestListCommand_NoWorktrees(t *testing.T) {
245245 cmd := & cli.Command {}
246246
247247 cfg := & config.Config {
248- Defaults : config.Defaults {BaseDir : "../worktrees" },
248+ Defaults : config.Defaults {BaseDir : config . DefaultBaseDir },
249249 }
250250 err := listCommandWithCommandExecutor (cmd , & buf , mockExec , cfg , "/test/repo" )
251251
@@ -306,7 +306,7 @@ func TestListCommand_InternationalCharacters(t *testing.T) {
306306 cmd := & cli.Command {}
307307
308308 cfg := & config.Config {
309- Defaults : config.Defaults {BaseDir : "../worktrees" },
309+ Defaults : config.Defaults {BaseDir : config . DefaultBaseDir },
310310 }
311311 err := listCommandWithCommandExecutor (cmd , & buf , mockExec , cfg , "/test/repo" )
312312
@@ -374,7 +374,7 @@ func TestListCommand_LongPaths(t *testing.T) {
374374 cmd := & cli.Command {}
375375
376376 cfg := & config.Config {
377- Defaults : config.Defaults {BaseDir : "../worktrees" },
377+ Defaults : config.Defaults {BaseDir : config . DefaultBaseDir },
378378 }
379379 err := listCommandWithCommandExecutor (cmd , & buf , mockExec , cfg , "/test/repo" )
380380
@@ -424,7 +424,7 @@ branch refs/heads/feature/test
424424 cmd := & cli.Command {}
425425
426426 cfg := & config.Config {
427- Defaults : config.Defaults {BaseDir : "../worktrees" },
427+ Defaults : config.Defaults {BaseDir : config . DefaultBaseDir },
428428 }
429429 err := listCommandWithCommandExecutor (cmd , & buf , mockExec , cfg , "/test/repo" )
430430
@@ -455,7 +455,7 @@ func TestListCommand_HeaderFormatting(t *testing.T) {
455455 cmd := & cli.Command {}
456456
457457 cfg := & config.Config {
458- Defaults : config.Defaults {BaseDir : "../worktrees" },
458+ Defaults : config.Defaults {BaseDir : config . DefaultBaseDir },
459459 }
460460 err := listCommandWithCommandExecutor (cmd , & buf , mockExec , cfg , "/test/repo" )
461461
@@ -558,7 +558,7 @@ branch refs/heads/feature/awesome
558558 cmd := & cli.Command {}
559559
560560 cfg := & config.Config {
561- Defaults : config.Defaults {BaseDir : "../worktrees" },
561+ Defaults : config.Defaults {BaseDir : config . DefaultBaseDir },
562562 }
563563 err := listCommandWithCommandExecutor (cmd , & buf , mockExec , cfg , "/repo" )
564564
@@ -693,7 +693,7 @@ branch refs/heads/hoge
693693 }
694694
695695 // Special handling for the base_dir test case
696- baseDir := "../worktrees"
696+ baseDir := config . DefaultBaseDir
697697 if tt .name == "paths relative to main worktree when in subdirectory" {
698698 baseDir = ".worktrees"
699699 mainRepoPath = "/Users/satoshi/dev/src/github.com/satococoa/giselle"
@@ -784,7 +784,7 @@ branch refs/heads/feature/long-branch-name-that-might-also-be-truncated
784784 cmd := & cli.Command {}
785785
786786 cfg := & config.Config {
787- Defaults : config.Defaults {BaseDir : "../worktrees" },
787+ Defaults : config.Defaults {BaseDir : config . DefaultBaseDir },
788788 }
789789 err := listCommandWithCommandExecutor (cmd , & buf , mockExec , cfg , "/repo" )
790790
0 commit comments