1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/pkg/gui/dummies.go

23 lines
770 B
Go
Raw Normal View History

package gui
import (
2022-01-08 05:00:36 +02:00
"github.com/jesseduffield/lazygit/pkg/commands/git_config"
2021-07-22 19:45:43 +02:00
"github.com/jesseduffield/lazygit/pkg/commands/oscommands"
"github.com/jesseduffield/lazygit/pkg/config"
"github.com/jesseduffield/lazygit/pkg/updates"
2021-07-22 19:45:43 +02:00
"github.com/jesseduffield/lazygit/pkg/utils"
)
// NewDummyGui creates a new dummy GUI for testing
func NewDummyUpdater() *updates.Updater {
newAppConfig := config.NewDummyAppConfig()
2021-12-29 03:03:35 +02:00
dummyUpdater, _ := updates.NewUpdater(utils.NewDummyCommon(), newAppConfig, oscommands.NewDummyOSCommand())
2021-12-06 12:08:36 +02:00
return dummyUpdater
}
func NewDummyGui() *Gui {
newAppConfig := config.NewDummyAppConfig()
2022-01-31 13:11:34 +02:00
dummyGui, _ := NewGui(utils.NewDummyCommon(), newAppConfig, git_config.NewFakeGitConfig(nil), NewDummyUpdater(), false, "")
2021-12-06 12:08:36 +02:00
return dummyGui
}