dotfiles/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/hosted-git-info/test/bitbucket-https-with-embedded-auth.js

28 lines
921 B
JavaScript
Raw Normal View History

2016-09-11 09:29:13 +01:00
'use strict'
var HostedGit = require('../index')
var test = require('tap').test
test('Bitbucket HTTPS URLs with embedded auth', function (t) {
t.is(
HostedGit.fromUrl('https://user:pass@bitbucket.org/user/repo.git').toString(),
'git+https://user:pass@bitbucket.org/user/repo.git',
'credentials were included in URL'
)
t.is(
HostedGit.fromUrl('https://user:pass@bitbucket.org/user/repo').toString(),
'git+https://user:pass@bitbucket.org/user/repo.git',
'credentials were included in URL'
)
t.is(
HostedGit.fromUrl('git+https://user:pass@bitbucket.org/user/repo.git').toString(),
'git+https://user:pass@bitbucket.org/user/repo.git',
'credentials were included in URL'
)
t.is(
HostedGit.fromUrl('git+https://user:pass@bitbucket.org/user/repo').toString(),
'git+https://user:pass@bitbucket.org/user/repo.git',
'credentials were included in URL'
)
t.end()
})