[test] add test for prependPath option

This commit is contained in:
Jarrett Cruger 2014-09-11 18:44:28 -04:00
parent 9a534c6ff6
commit e44fabe58a

View File

@ -140,6 +140,16 @@ describe('lib/http-proxy/common.js', function () {
expect(outgoing.path).to.eql('some-path/am');
});
it('should not prepend the target path to the outgoing path with prependPath = false', function () {
var outgoing = {};
common.setupOutgoing(outgoing, {
target: { path: 'hellothere' },
prependPath: false
}, { url: 'hi' });
expect(outgoing.path).to.eql('hi');
})
});
describe('#setupSocket', function () {