[Pkg-javascript-commits] [node-mocks-http] 16/296: Support files in request
Thorsten Alteholz
alteholz at moszumanska.debian.org
Mon Feb 8 18:13:17 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 4d35441c4590ad7ccdf3076e0897871f50edeee2
Author: Ray - SunQi <qsun01185 at cienet.com.cn>
Date: Mon Mar 26 19:54:43 2012 +0800
Support files in request
---
lib/mockRequest.js | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/lib/mockRequest.js b/lib/mockRequest.js
index 7ba5833..bddce29 100644
--- a/lib/mockRequest.js
+++ b/lib/mockRequest.js
@@ -38,6 +38,7 @@ exports.createRequest = function(options) {
session: (options.session) ? options.session : {},
body : (options.body ) ? options.body : {},
query : (options.query ) ? options.query : {},
+ files : (options.files ) ? options.files : {},
/**
* Function: _setParameter
@@ -66,6 +67,16 @@ exports.createRequest = function(options) {
},
/**
+ * Sets a variable that is stored in the files.
+ *
+ * @param variable The variable to store in the session
+ * @param value The value associated with the variable
+ */
+ _setFilesVariable: function( variable, value ) {
+ this.files[variable] = value;
+ },
+
+ /**
* Function: _setMethod
*
* Sets the HTTP method that the client gets when the called the 'method'
--
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