MCPcopy Create free account
hub / github.com/checkmake/checkmake / TestGetConfigValueOnMissingDefaultSection

Function TestGetConfigValueOnMissingDefaultSection

config/config_test.go:70–81  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68}
69
70func TestGetConfigValueOnMissingDefaultSection(t *testing.T) {
71 cfg, err := NewConfigFromFile("../fixtures/exampleConfigNoDefault.ini")
72
73 require.Equal(t, nil, err, "Parsing of the fixture config file should have worked.")
74
75 format, err := cfg.GetConfigValue("format")
76
77 assert.NotEqual(t, nil, err)
78
79 assert.Equal(t, "", format)
80 assert.Equal(t, "config has no default section", err.Error())
81}

Callers

nothing calls this directly

Calls 2

NewConfigFromFileFunction · 0.85
GetConfigValueMethod · 0.80

Tested by

no test coverage detected