mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
add simple test for PrepareCommitAmendSubProcess
This commit is contained in:
@ -189,6 +189,19 @@ func TestGitCommandStashSave(t *testing.T) {
|
|||||||
assert.NoError(t, gitCmd.StashSave("A stash message"))
|
assert.NoError(t, gitCmd.StashSave("A stash message"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestGitCommandCommitAmend(t *testing.T) {
|
||||||
|
gitCmd := newDummyGitCommand()
|
||||||
|
gitCmd.OSCommand.command = func(cmd string, args ...string) *exec.Cmd {
|
||||||
|
assert.EqualValues(t, "git", cmd)
|
||||||
|
assert.EqualValues(t, []string{"commit", "--amend", "--allow-empty"}, args)
|
||||||
|
|
||||||
|
return exec.Command("echo")
|
||||||
|
}
|
||||||
|
|
||||||
|
_, err := gitCmd.PrepareCommitAmendSubProcess().CombinedOutput()
|
||||||
|
assert.NoError(t, err)
|
||||||
|
}
|
||||||
|
|
||||||
func TestGitCommandMergeStatusFiles(t *testing.T) {
|
func TestGitCommandMergeStatusFiles(t *testing.T) {
|
||||||
type scenario struct {
|
type scenario struct {
|
||||||
oldFiles []File
|
oldFiles []File
|
||||||
|
Reference in New Issue
Block a user