X Tutup
Skip to content

Commit 79b5ca2

Browse files
committed
update default config test values
1 parent 15bfb54 commit 79b5ca2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

internal/config/config_file_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ github.com:
110110
_, err := ParseConfig("config.yml")
111111
assert.Nil(t, err)
112112

113-
expectedMain := "# What protocol to use when performing git operations. Supported values: ssh, https\ngit_protocol: https\n# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.\neditor:\n# Aliases allow you to create nicknames for gh commands\naliases:\n co: pr checkout\n"
113+
expectedMain := "# What protocol to use when performing git operations. Supported values: ssh, https\ngit_protocol: https\n# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.\neditor:\n# When to interactively prompt. This is a global config that cannot be overriden by hostname. Supported values: auto, never\nprompt: auto\n# Aliases allow you to create nicknames for gh commands\naliases:\n co: pr checkout\n"
114114
expectedHosts := `github.com:
115115
user: keiyuri
116116
oauth_token: "123456"

internal/config/config_type_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func Test_fileConfig_Set(t *testing.T) {
1919
assert.NoError(t, c.Set("github.com", "user", "hubot"))
2020
assert.NoError(t, c.Write())
2121

22-
expected := "# What protocol to use when performing git operations. Supported values: ssh, https\ngit_protocol: https\n# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.\neditor: nano\n# Aliases allow you to create nicknames for gh commands\naliases:\n co: pr checkout\n"
22+
expected := "# What protocol to use when performing git operations. Supported values: ssh, https\ngit_protocol: https\n# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.\neditor: nano\n# When to interactively prompt. This is a global config that cannot be overriden by hostname. Supported values: auto, never\nprompt: auto\n# Aliases allow you to create nicknames for gh commands\naliases:\n co: pr checkout\n"
2323
assert.Equal(t, expected, mainBuf.String())
2424
assert.Equal(t, `github.com:
2525
git_protocol: ssh
@@ -37,7 +37,7 @@ func Test_defaultConfig(t *testing.T) {
3737
cfg := NewBlankConfig()
3838
assert.NoError(t, cfg.Write())
3939

40-
expected := "# What protocol to use when performing git operations. Supported values: ssh, https\ngit_protocol: https\n# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.\neditor:\n# Aliases allow you to create nicknames for gh commands\naliases:\n co: pr checkout\n"
40+
expected := "# What protocol to use when performing git operations. Supported values: ssh, https\ngit_protocol: https\n# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.\neditor:\n# When to interactively prompt. This is a global config that cannot be overriden by hostname. Supported values: auto, never\nprompt: auto\n# Aliases allow you to create nicknames for gh commands\naliases:\n co: pr checkout\n"
4141
assert.Equal(t, expected, mainBuf.String())
4242
assert.Equal(t, "", hostsBuf.String())
4343

0 commit comments

Comments
 (0)
X Tutup