File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,18 +29,20 @@ describe('LDNODE params', function () {
2929 nock ( 'https://amazingwebsite.tld' )
3030 . get ( '/' )
3131 . reply ( function ( uri , req ) {
32+ if ( this . req . headers [ 'accept' ] !== 'text/turtle' ) {
33+ throw Error ( 'Accept is received on the header' )
34+ }
3235 if ( this . req . headers [ 'test' ] && this . req . headers [ 'test' ] === 'test1' ) {
33- return [ 200 , 'YES' , { 'content-type' : this . req . headers [ 'accept' ] } ]
36+ return [ 200 , 'YES' ]
3437 } else {
3538 return [ 500 , 'empty' ]
3639 }
3740 } )
3841
3942 server . get ( '/proxy?uri=https://amazingwebsite.tld/' )
4043 . set ( 'test' , 'test1' )
41- . set ( 'accept' , 'application/json ' )
44+ . set ( 'accept' , 'text/turtle ' )
4245 . expect ( 200 )
43- . expect ( 'content-type' , 'application/json' )
4446 . end ( function ( err , data ) {
4547 if ( err ) return done ( err )
4648 done ( err )
You can’t perform that action at this time.
0 commit comments