mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
Add test to check that the git dir for a deleted submodule was removed
The test shows that it actually doesn't work when the submodule name is different from its path. We'll fix this in the next commit.
This commit is contained in:
@ -17,6 +17,9 @@ var Remove = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
shell.Commit("add submodule")
|
shell.Commit("add submodule")
|
||||||
},
|
},
|
||||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
gitDirSubmodulePath := ".git/modules/my_submodule_name"
|
||||||
|
t.FileSystem().PathPresent(gitDirSubmodulePath)
|
||||||
|
|
||||||
t.Views().Submodules().Focus().
|
t.Views().Submodules().Focus().
|
||||||
Lines(
|
Lines(
|
||||||
Contains("my_submodule_name").IsSelected(),
|
Contains("my_submodule_name").IsSelected(),
|
||||||
@ -41,5 +44,10 @@ var Remove = NewIntegrationTest(NewIntegrationTestArgs{
|
|||||||
Contains("- path = my_submodule_path").
|
Contains("- path = my_submodule_path").
|
||||||
Contains("- url = ../other_repo"),
|
Contains("- url = ../other_repo"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/* EXPECTED:
|
||||||
|
t.FileSystem().PathNotPresent(gitDirSubmodulePath)
|
||||||
|
ACTUAL: */
|
||||||
|
t.FileSystem().PathPresent(gitDirSubmodulePath)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user