mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-17 01:42:45 +02:00
Add missing validation tests
This commit is contained in:
@ -30,6 +30,32 @@ func TestUserConfigValidate_enums(t *testing.T) {
|
||||
{value: "invalid_value", valid: false},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Gui.ShowDivergenceFromBaseBranch",
|
||||
setup: func(config *UserConfig, value string) {
|
||||
config.Gui.ShowDivergenceFromBaseBranch = value
|
||||
},
|
||||
testCases: []testCase{
|
||||
{value: "none", valid: true},
|
||||
{value: "onlyArrow", valid: true},
|
||||
{value: "arrowAndNumber", valid: true},
|
||||
{value: "", valid: false},
|
||||
{value: "invalid_value", valid: false},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Git.AutoForwardBranches",
|
||||
setup: func(config *UserConfig, value string) {
|
||||
config.Git.AutoForwardBranches = value
|
||||
},
|
||||
testCases: []testCase{
|
||||
{value: "none", valid: true},
|
||||
{value: "onlyMainBranches", valid: true},
|
||||
{value: "allBranches", valid: true},
|
||||
{value: "", valid: false},
|
||||
{value: "invalid_value", valid: false},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Keybindings",
|
||||
setup: func(config *UserConfig, value string) {
|
||||
|
Reference in New Issue
Block a user