diff --git a/test/index.js b/test/index.js index 0c14c27..2fbaf7b 100644 --- a/test/index.js +++ b/test/index.js @@ -205,6 +205,16 @@ describe('github-url-to-object', function () { assert.equal(obj.branch, '2.1') }) + it('resolves URLS for branches containing special characters', function () { + var obj = gh('https://github.com/zeke/outlet/tree/%3D%40') + assert.equal(obj.branch, '=@') + }) + + it('resolves URLS for branches containing special characters following after normal one', function () { + var obj = gh('https://github.com/zeke/outlet/tree/v%3D%40') + assert.equal(obj.branch, 'v=@') + }) + it('resolves blob-style URLS for branches other than master', function () { var obj = gh('https://github.com/zeke/ord/blob/new-style/.gitignore') assert.equal(obj.branch, 'new-style')