Skip to content

Commit df8f1fe

Browse files
committed
Add an SSH alias test for github
1 parent 2c11506 commit df8f1fe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/commands/hosting_service/hosting_service_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ func TestGetPullRequestURL(t *testing.T) {
5656
assert.Equal(t, "https://github.com/peter/calculator/compare/feature%2Fsum-operation?expand=1", url)
5757
},
5858
},
59+
{
60+
testName: "Opens a link to new pull request on github custom SSH config alias and a corresponding service config",
61+
from: "feature/sum-operation",
62+
remoteUrl: "github:peter/calculator.git",
63+
configServiceDomains: map[string]string{"github": "github:github.com"},
64+
test: func(url string, err error) {
65+
assert.NoError(t, err)
66+
assert.Equal(t, "https://github.com/peter/calculator/compare/feature%2Fsum-operation?expand=1", url)
67+
},
68+
},
5969
{
6070
testName: "Opens a link to new pull request on github with extra slash removed",
6171
from: "feature/sum-operation",

0 commit comments

Comments
 (0)