From ddcd9163018e264321046023d49ab176f71733c7 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sat, 10 Feb 2024 19:44:43 +0100 Subject: [PATCH] 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. --- pkg/integration/tests/submodule/remove.go | 8 ++++++++ 1 file changed, 8 insertions(+) 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) }, })