Use getters for AppState and UserConfig instead of accessing the fields directly
This will allow us to make them private.
This commit is contained in:
@@ -13,7 +13,7 @@ var KeybindingSuggestionsWhenSwitchingRepos = NewIntegrationTest(NewIntegrationT
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
otherRepo, _ := filepath.Abs("../other")
|
||||
config.AppState.RecentRepos = []string{otherRepo}
|
||||
config.GetAppState().RecentRepos = []string{otherRepo}
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.CloneNonBare("other")
|
||||
|
||||
@@ -10,7 +10,7 @@ var OpenLinkFailure = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
ExtraCmdArgs: []string{},
|
||||
Skip: false,
|
||||
SetupConfig: func(config *config.AppConfig) {
|
||||
config.UserConfig.OS.OpenLink = "exit 42"
|
||||
config.GetUserConfig().OS.OpenLink = "exit 42"
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
|
||||
Reference in New Issue
Block a user