mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-10 22:42:00 +02:00
Add an integration test for a config with a negative refspec
This commit is contained in:
committed by
Stefan Haller
parent
bf6d2a1c28
commit
b76b73943a
25
pkg/integration/tests/config/negative_refspec.go
Normal file
25
pkg/integration/tests/config/negative_refspec.go
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
package config
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/config"
|
||||||
|
. "github.com/jesseduffield/lazygit/pkg/integration/components"
|
||||||
|
)
|
||||||
|
|
||||||
|
var NegativeRefspec = NewIntegrationTest(NewIntegrationTestArgs{
|
||||||
|
Description: "Having a config with a negative refspec",
|
||||||
|
ExtraCmdArgs: []string{},
|
||||||
|
GitVersion: AtLeast("2.29.0"),
|
||||||
|
SetupRepo: func(shell *Shell) {
|
||||||
|
shell.
|
||||||
|
SetConfig("remote.origin.fetch", "^refs/heads/test").
|
||||||
|
CreateNCommits(2)
|
||||||
|
},
|
||||||
|
SetupConfig: func(cfg *config.AppConfig) {},
|
||||||
|
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||||
|
// the failure case with an unpatched go-git is that no branches display
|
||||||
|
t.Views().Branches().
|
||||||
|
Lines(
|
||||||
|
Contains("master"),
|
||||||
|
)
|
||||||
|
},
|
||||||
|
})
|
@@ -130,6 +130,7 @@ var tests = []*components.IntegrationTest{
|
|||||||
commit.StagedWithoutHooks,
|
commit.StagedWithoutHooks,
|
||||||
commit.Unstaged,
|
commit.Unstaged,
|
||||||
config.CustomCommandsInPerRepoConfig,
|
config.CustomCommandsInPerRepoConfig,
|
||||||
|
config.NegativeRefspec,
|
||||||
config.RemoteNamedStar,
|
config.RemoteNamedStar,
|
||||||
conflicts.Filter,
|
conflicts.Filter,
|
||||||
conflicts.ResolveExternally,
|
conflicts.ResolveExternally,
|
||||||
|
Reference in New Issue
Block a user