diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-08 16:02:56 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2022-01-09 14:09:53 +1100 |
commit | ccf90466fa1d7ed32a7211115d46c59846dfd622 (patch) | |
tree | 1f835a00f20833e3ba5379900ef1437eaa464af3 /pkg/commands/loaders/files_test.go | |
parent | 16c9b5404d52f3e2b93de7262fff607b18f98cea (diff) |
fix test
Diffstat (limited to 'pkg/commands/loaders/files_test.go')
-rw-r--r-- | pkg/commands/loaders/files_test.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pkg/commands/loaders/files_test.go b/pkg/commands/loaders/files_test.go index 825164e01..b860a1470 100644 --- a/pkg/commands/loaders/files_test.go +++ b/pkg/commands/loaders/files_test.go @@ -3,7 +3,6 @@ package loaders import ( "testing" - "github.com/jesseduffield/lazygit/pkg/commands/git_config" "github.com/jesseduffield/lazygit/pkg/commands/models" "github.com/jesseduffield/lazygit/pkg/commands/oscommands" "github.com/jesseduffield/lazygit/pkg/utils" @@ -189,12 +188,11 @@ func TestFileGetStatusFiles(t *testing.T) { s := s t.Run(s.testName, func(t *testing.T) { cmd := oscommands.NewDummyCmdObjBuilder(s.runner) - gitConfig := git_config.NewFakeGitConfig(map[string]string{"status.showUntrackedFiles": "yes"}) loader := &FileLoader{ Common: utils.NewDummyCommon(), cmd: cmd, - gitConfig: gitConfig, + config: &FakeFileLoaderConfig{showUntrackedFiles: "yes"}, getFileType: func(string) string { return "file" }, } @@ -202,3 +200,11 @@ func TestFileGetStatusFiles(t *testing.T) { }) } } + +type FakeFileLoaderConfig struct { + showUntrackedFiles string +} + +func (self *FakeFileLoaderConfig) GetShowUntrackedFiles() string { + return self.showUntrackedFiles +} |