Skip to content

Commit

Permalink
Add test for including quotes around a complex ref in git.fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
steveukx committed May 6, 2019
1 parent b6d4d15 commit b95149e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/unit/test-fetch.js
Expand Up @@ -24,6 +24,18 @@ exports.push = {
done();
},

'runs escaped fetch' (test) {
const branchPrefix = 'some-name';
const ref = `'refs/heads/${branchPrefix}*:refs/remotes/origin/${branchPrefix}*'`;

git.fetch(`origin`, ref, { '--depth': '2' }, () => {
test.same(['fetch', '--depth=2', 'origin', ref], setup.theCommandRun());
test.done();

});
setup.closeWith('');
},

'git generates a fetch summary': function (test) {
git.fetch('r', 'b', function (err, result) {
test.ok(result instanceof FetchSummary);
Expand Down

0 comments on commit b95149e

Please sign in to comment.