Test for explicit config disable of label colors
This commit is contained in:
parent
c5206109ca
commit
5c12f5633e
1 changed files with 9 additions and 0 deletions
|
|
@ -448,6 +448,11 @@ func Test_ioStreams_colorLabels(t *testing.T) {
|
||||||
config: enableColorLabelsConfig(),
|
config: enableColorLabelsConfig(),
|
||||||
colorLabelsEnabled: true,
|
colorLabelsEnabled: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "config with colorLabels disabled",
|
||||||
|
config: disableColorLabelsConfig(),
|
||||||
|
colorLabelsEnabled: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "colorLabels enabled via `1` in GH_COLOR_LABELS env var",
|
name: "colorLabels enabled via `1` in GH_COLOR_LABELS env var",
|
||||||
env: map[string]string{"GH_COLOR_LABELS": "1"},
|
env: map[string]string{"GH_COLOR_LABELS": "1"},
|
||||||
|
|
@ -611,6 +616,10 @@ func disablePromptConfig() gh.Config {
|
||||||
return config.NewFromString("prompt: disabled")
|
return config.NewFromString("prompt: disabled")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func disableColorLabelsConfig() gh.Config {
|
||||||
|
return config.NewFromString("color_labels: disabled")
|
||||||
|
}
|
||||||
|
|
||||||
func enableColorLabelsConfig() gh.Config {
|
func enableColorLabelsConfig() gh.Config {
|
||||||
return config.NewFromString("color_labels: enabled")
|
return config.NewFromString("color_labels: enabled")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue