diff --git a/test/get-git-auth-url.test.js b/test/get-git-auth-url.test.js index 16b58159..8312d2a0 100644 --- a/test/get-git-auth-url.test.js +++ b/test/get-git-auth-url.test.js @@ -244,6 +244,19 @@ test('Return the "https" formatted URL if "gitCredentials" is defined with "BITB ); }); +test('Return the "https" formatted URL if "GITHUB_ACTION" is set', async t => { + const {cwd} = await gitRepo(); + + t.is( + await getAuthUrl({ + cwd, + env: {...env, GITHUB_ACTION: 'foo', GITHUB_TOKEN: 'token'}, + options: {branch: 'master', repositoryUrl: 'git@host.null:owner/repo.git'}, + }), + 'https://x-access-token:token@host.null/owner/repo.git' + ); +}); + test('Handle "https" URL with group and subgroup, with "GIT_CREDENTIALS"', async t => { const {cwd} = await gitRepo();