url-assembler
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -14,2 +14,6 @@ var extend = require('extend'); | ||
this._prefix = this.pathname; | ||
if(this._prefix === '/') { | ||
this._prefix = ''; | ||
this.pathname = ''; | ||
} | ||
} | ||
@@ -16,0 +20,0 @@ |
{ | ||
"name": "url-assembler", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Assemble urls from route-like templates (/path/:param)", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -26,2 +26,12 @@ var expect = require('chai').expect | ||
describe('when the baseUrl stops at the port number', function () { | ||
beforeEach(function () { | ||
myUrl = UrlAssembler('http://domain.com:90'); | ||
}) | ||
it('does not double slash the result', function () { | ||
expect(myUrl.segment('/hello').toString()).to.equal('http://domain.com:90/hello'); | ||
}) | ||
}); | ||
}); |
10379
193