mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-17 12:06:38 +02:00
Add an integration test for a config with a negative refspec
This commit is contained in:
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.Unstaged,
|
||||
config.CustomCommandsInPerRepoConfig,
|
||||
config.NegativeRefspec,
|
||||
config.RemoteNamedStar,
|
||||
conflicts.Filter,
|
||||
conflicts.ResolveExternally,
|
||||
|
Loading…
x
Reference in New Issue
Block a user