Improve test coverage.

This commit is contained in:
jregan
2018-10-28 13:07:15 -07:00
parent 383b3e798b
commit 885c1952a4
6 changed files with 230 additions and 115 deletions

View File

@@ -34,6 +34,10 @@ func TestIsRepoURL(t *testing.T) {
input: "github.com/org/repo",
expected: true,
},
{
input: "git::https://gitlab.com/org/repo",
expected: true,
},
{
input: "/github.com/org/repo",
expected: false,
@@ -47,8 +51,16 @@ func TestIsRepoURL(t *testing.T) {
expected: false,
},
{
input: "git::https://gitlab.com/org/repo",
expected: true,
input: "foo",
expected: false,
},
{
input: ".",
expected: false,
},
{
input: "",
expected: false,
},
}
for _, tc := range testcases {