mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[test] for override method feature
This commit is contained in:
parent
d533a1be43
commit
81d58c531b
@ -347,6 +347,16 @@ describe('lib/http-proxy/common.js', function () {
|
|||||||
expect(outgoing.secureProtocol).eql('my-secure-protocol');
|
expect(outgoing.secureProtocol).eql('my-secure-protocol');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should handle overriding the `method` of the http request', function () {
|
||||||
|
var outgoing = {};
|
||||||
|
common.setupOutgoing(outgoing, {
|
||||||
|
target: url.parse('https://whooooo.com'),
|
||||||
|
method: 'POST' ,
|
||||||
|
}, { method: 'GET', url: '' });
|
||||||
|
|
||||||
|
expect(outgoing.method).eql('POST');
|
||||||
|
});
|
||||||
|
|
||||||
// url.parse('').path => null
|
// url.parse('').path => null
|
||||||
it('should not pass null as last arg to #urlJoin', function(){
|
it('should not pass null as last arg to #urlJoin', function(){
|
||||||
var outgoing = {};
|
var outgoing = {};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user