[Pkg-javascript-commits] [node-mocks-http] 253/296: Fixed issue 68
Thorsten Alteholz
alteholz at moszumanska.debian.org
Mon Feb 8 18:13:42 UTC 2016
This is an automated email from the git hooks/post-receive script.
alteholz pushed a commit to branch master
in repository node-mocks-http.
commit 413f0a289049cbf2abec3e76d5482ec0e2fc1d45
Author: Aaron J. Lang <aaronjameslang at googlemail.com>
Date: Tue Aug 4 12:52:31 2015 +0100
Fixed issue 68
Old tests pass, new test passes, linter silent
---
lib/mockRequest.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/mockRequest.js b/lib/mockRequest.js
index 8a93677..559109d 100644
--- a/lib/mockRequest.js
+++ b/lib/mockRequest.js
@@ -52,7 +52,8 @@ function createRequest(options) {
mockRequest.method = (options.method) ? options.method : 'GET';
mockRequest.url = (options.url) ? options.url : '';
mockRequest.originalUrl = options.originalUrl || mockRequest.url;
- mockRequest.path = (options.url) ? url.parse(options.url).pathname : '';
+ mockRequest.path = options.path ||
+ (( (options.url) ? url.parse(options.url).pathname : '' ));
mockRequest.params = (options.params) ? options.params : {};
if (options.session) {
mockRequest.session = options.session;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-mocks-http.git
More information about the Pkg-javascript-commits
mailing list