(t *testing.T)
| 17 | } |
| 18 | |
| 19 | func TestNewConfigProvidesFallback(t *testing.T) { |
| 20 | var spiedCfg *ghConfig.Config |
| 21 | ghConfig.Read = func(fallback *ghConfig.Config) (*ghConfig.Config, error) { |
| 22 | spiedCfg = fallback |
| 23 | return fallback, nil |
| 24 | } |
| 25 | _, err := NewConfig() |
| 26 | require.NoError(t, err) |
| 27 | requireKeyWithValue(t, spiedCfg, []string{versionKey}, "1") |
| 28 | requireKeyWithValue(t, spiedCfg, []string{gitProtocolKey}, "https") |
| 29 | requireKeyWithValue(t, spiedCfg, []string{editorKey}, "") |
| 30 | requireKeyWithValue(t, spiedCfg, []string{promptKey}, "enabled") |
| 31 | requireKeyWithValue(t, spiedCfg, []string{pagerKey}, "") |
| 32 | requireKeyWithValue(t, spiedCfg, []string{aliasesKey, "co"}, "pr checkout") |
| 33 | requireKeyWithValue(t, spiedCfg, []string{httpUnixSocketKey}, "") |
| 34 | requireKeyWithValue(t, spiedCfg, []string{browserKey}, "") |
| 35 | requireKeyWithValue(t, spiedCfg, []string{colorLabelsKey}, "disabled") |
| 36 | } |
| 37 | |
| 38 | func TestGetOrDefaultApplicationDefaults(t *testing.T) { |
| 39 | tests := []struct { |
nothing calls this directly
no test coverage detected