Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support new wreck in mocks #67

Merged
merged 3 commits into from Apr 2, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 7 additions & 7 deletions test/mock.js
Expand Up @@ -189,7 +189,7 @@ exports.V2 = internals.V2 = function () {
profile_picture: 'http://distillery.s3.amazonaws.com/profiles/profile_1574083_75sq_1295469061.jpg'
};
}

if (code.client_id === 'vk') {
payload.user_id = '1234567890';
payload.email = 'steve@example.com';
Expand Down Expand Up @@ -253,13 +253,13 @@ exports.override = function (uri, payload) {
return Hoek.nextTick(callback)(null, { statusCode: 200 }, typeof payload === 'string' ? payload : JSON.stringify(payload));
}

return internals.nipple[method].apply(null, arguments);
return internals.wreck[method].apply(null, arguments);
}
};

internals.nipple = {
get: Wreck.get,
post: Wreck.post
internals.wreck = {
get: Wreck.get.bind(Wreck),
post: Wreck.post.bind(Wreck)
};

Wreck.get = override('get');
Expand All @@ -269,6 +269,6 @@ exports.override = function (uri, payload) {

exports.clear = function (uri) {

Wreck.get = internals.nipple.get;
Wreck.post = internals.nipple.post;
Wreck.get = internals.wreck.get;
Wreck.post = internals.wreck.post;
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing EOL

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of failed tests. I am guessing this may be broke without this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOL exists, ya... wanted to see if travis failed too. Something is broke since last publish of bell