fix: add trailing .git to repositoryUrl only if it's present in the configured URL

This commit is contained in:
Pierre Vanduynslager
2018-04-12 17:42:53 -04:00
parent 7c9ec41dd7
commit cb1f80cb56
2 changed files with 6 additions and 4 deletions
+4
View File
@@ -37,6 +37,10 @@ test.serial(
}
);
test.serial('Do not add trailing ".git" if not present in the origian URL', async t => {
t.is(await getAuthUrl({repositoryUrl: 'git@host.null:owner/repo'}), 'git@host.null:owner/repo');
});
test.serial('Handle "https" URL with group and subgroup', async t => {
t.is(
await getAuthUrl({repositoryUrl: 'https://host.null/group/subgroup/owner/repo.git'}),