@@ -158,6 +158,8 @@ func Test_normalizeURL(t *testing.T) {
158158 {".git suffix" , "https://github.com/foo/bar.git" , "https://github.com/foo/bar.git" },
159159 {"http://" , "http://github.com/foo/bar" , "https://github.com/foo/bar.git" },
160160 {"git://" , "git://github.com/foo/bar" , "https://github.com/foo/bar.git" },
161+ {"Root URL" , "https://github.com" , "https://github.com/" },
162+ {"Root URL with trailing slash" , "https://github.com/" , "https://github.com/" },
161163 }
162164
163165 for _ , testTable := range testTables {
@@ -196,6 +198,8 @@ func Test_uRLIsUnder(t *testing.T) {
196198 {"Mismatch, root path" , "https://github.com/foo/bar" , []string {"example.com" , "example.org" }, assert .False },
197199 {"Match, subfolder" , "https://github.com/foo/bar" , []string {"example.com/foo" , "github.com/foo" }, assert .True },
198200 {"Mismatch, subfolder" , "https://github.com/foo/bar" , []string {"example.com/foo" , "github.org/bar" }, assert .False },
201+ {"Match, root child URL" , "https://github.com/" , []string {"example.com" , "github.com" }, assert .True },
202+ {"Mismatch, root child URL" , "https://github.com/" , []string {"example.com" , "github.org" }, assert .False },
199203 }
200204
201205 for _ , testTable := range testTables {
0 commit comments