summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-02-10 19:44:43 +0100
committerStefan Haller <stefan@haller-berlin.de>2024-03-07 20:16:28 +0100
commitddcd9163018e264321046023d49ab176f71733c7 (patch)
tree1c9203468bb51e2ec0cc1fd144297cc212779b0f
parent85a6a42bff05c38d0485ff40ce064145604c661b (diff)
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.
-rw-r--r--pkg/integration/tests/submodule/remove.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/integration/tests/submodule/remove.go b/pkg/integration/tests/submodule/remove.go
index 886eb6294..f4f1cd04f 100644
--- a/pkg/integration/tests/submodule/remove.go
+++ b/pkg/integration/tests/submodule/remove.go
@@ -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)
},
})