{"action":"closed","issue":{"url":"https://api.github.com/repos/balderdashy/skipper-s3/issues/39","labels_url":"https://api.github.com/repos/balderdashy/skipper-s3/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/skipper-s3/issues/39/comments","events_url":"https://api.github.com/repos/balderdashy/skipper-s3/issues/39/events","html_url":"https://github.com/balderdashy/skipper-s3/issues/39","id":116452771,"number":39,"title":"Stubbing out skipper-s3 for tests","user":{"login":"joshbedo","id":607239,"avatar_url":"https://avatars.githubusercontent.com/u/607239?v=3","gravatar_id":"","url":"https://api.github.com/users/joshbedo","html_url":"https://github.com/joshbedo","followers_url":"https://api.github.com/users/joshbedo/followers","following_url":"https://api.github.com/users/joshbedo/following{/other_user}","gists_url":"https://api.github.com/users/joshbedo/gists{/gist_id}","starred_url":"https://api.github.com/users/joshbedo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshbedo/subscriptions","organizations_url":"https://api.github.com/users/joshbedo/orgs","repos_url":"https://api.github.com/users/joshbedo/repos","events_url":"https://api.github.com/users/joshbedo/events{/privacy}","received_events_url":"https://api.github.com/users/joshbedo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-12T00:29:04Z","updated_at":"2015-11-16T19:08:09Z","closed_at":"2015-11-16T19:08:09Z","body":"I was wondering if anyone has a solution for writing tests that connect to methods using skipper-s3. I started trying to stub out the middleware method.\r\n\r\n```\r\n            _.each(sails.hooks.http.app.stack, function (middleware) {\r\n                if (middleware.handle.name === '_parseHTTPBody') {\r\n                    skipper = middleware;\r\n                }\r\n            });\r\n\r\n            sinon.stub(skipper, 'handle', function (req, res, next) {\r\n                sinon.stub(req, 'file');\r\n                return next();\r\n            });\r\n```\r\n\r\nbut that only is getting me so far.\r\n\r\nThanks!"}}