Fixes Issue #125 - Abusing externally passed in data structure
Also had to re-jig the test, as it turns out the contributor-supplied test for this work didn't *actually* test anything :(
This commit is contained in:
@ -87,8 +87,8 @@ vows.describe('OAuth2').addBatch({
|
||||
{ 'SomeHeader': '123' }),
|
||||
'When calling get': {
|
||||
'we should see the custom headers mixed into headers property in options passed to http-library' : function(oa) {
|
||||
https.request = function(options, callback) {
|
||||
assert.equal(headers["SomeHeader"], "123");
|
||||
oa._executeRequest= function( http_library, options, callback ) {
|
||||
assert.equal(options.headers["SomeHeader"], "123");
|
||||
};
|
||||
oa.get("", {});
|
||||
}
|
||||
|
Reference in New Issue
Block a user