@@ -107,7 +107,7 @@ describe('lib/http-proxy/passes/ws-incoming.js', function () {
107
107
108
108
describe ( '#XHeaders' , function ( ) {
109
109
it ( 'return if no forward request' , function ( ) {
110
- var returnValue = httpProxy . XHeaders . call ( { options : { } } , { } , { } ) ;
110
+ var returnValue = httpProxy . XHeaders ( { } , { } , { } ) ;
111
111
expect ( returnValue ) . to . be ( undefined ) ;
112
112
} ) ;
113
113
@@ -119,7 +119,7 @@ describe('lib/http-proxy/passes/ws-incoming.js', function () {
119
119
} ,
120
120
headers : { }
121
121
}
122
- httpProxy . XHeaders . call ( { options : { xfwd : true } } , stubRequest , { } ) ;
122
+ httpProxy . XHeaders ( stubRequest , { } , { xfwd : true } ) ;
123
123
expect ( stubRequest . headers [ 'x-forwarded-for' ] ) . to . be ( '192.168.1.2' ) ;
124
124
expect ( stubRequest . headers [ 'x-forwarded-port' ] ) . to . be ( '8080' ) ;
125
125
expect ( stubRequest . headers [ 'x-forwarded-proto' ] ) . to . be ( 'ws' ) ;
@@ -136,7 +136,7 @@ describe('lib/http-proxy/passes/ws-incoming.js', function () {
136
136
} ,
137
137
headers : { }
138
138
} ;
139
- httpProxy . XHeaders . call ( { options : { xfwd : true } } , stubRequest , { } ) ;
139
+ httpProxy . XHeaders ( stubRequest , { } , { xfwd : true } ) ;
140
140
expect ( stubRequest . headers [ 'x-forwarded-for' ] ) . to . be ( '192.168.1.3' ) ;
141
141
expect ( stubRequest . headers [ 'x-forwarded-port' ] ) . to . be ( '8181' ) ;
142
142
expect ( stubRequest . headers [ 'x-forwarded-proto' ] ) . to . be ( 'wss' ) ;
0 commit comments