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:
Stefan Haller 2024-02-10 19:44:43 +01:00
parent 85a6a42bff
commit ddcd916301

View file

@ -17,6 +17,9 @@ var Remove = NewIntegrationTest(NewIntegrationTestArgs{
shell.Commit("add submodule")
},
Run: func(t *TestDriver, keys config.KeybindingConfig) {
gitDirSubmodulePath := ".git/modules/my_submodule_name"
t.FileSystem().PathPresent(gitDirSubmodulePath)
t.Views().Submodules().Focus().
Lines(
Contains("my_submodule_name").IsSelected(),
@ -41,5 +44,10 @@ var Remove = NewIntegrationTest(NewIntegrationTestArgs{
Contains("- path = my_submodule_path").
Contains("- url = ../other_repo"),
)
/* EXPECTED:
t.FileSystem().PathNotPresent(gitDirSubmodulePath)
ACTUAL: */
t.FileSystem().PathPresent(gitDirSubmodulePath)
},
})