File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ function ResData(nodeRes) {
4
4
this . redirect = false ;
5
5
this . headers = { } ;
6
6
this . body = null ;
7
+ this . dispPath = null ;
8
+ this . reqBody = false ;
7
9
}
8
10
9
11
ResData . prototype . getRespHeader = function ( string ) {
@@ -44,11 +46,11 @@ ResData.prototype.doRedirect = function(bool) {
44
46
} ;
45
47
46
48
ResData . prototype . setDispPath = function ( string ) {
47
-
49
+ this . dispPath = string ;
48
50
} ;
49
51
50
52
ResData . prototype . setReqBody = function ( binary ) {
51
-
53
+ this . reqBody = binary ;
52
54
} ;
53
55
54
56
ResData . prototype . setRespBody = function ( body ) {
Original file line number Diff line number Diff line change 2
2
"author" : " Eric Redmond <eric.redmond@gmail.com>" ,
3
3
"name" : " webmachine" ,
4
4
"description" : " Webmachine Application Server" ,
5
- "version" : " 0.0.1 " ,
5
+ "version" : " 0.0.2 " ,
6
6
"preferGlobal" : " true" ,
7
7
"repository" : {
8
8
"type" : " git" ,
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ vows.describe('Server').addBatch({
14
14
resData . setRespHeader ( 'Location' , '/tmp' ) ;
15
15
resData . setRespBody ( 'data' ) ;
16
16
resData . doRedirect ( true ) ;
17
+ resData . setDispPath ( '/tmp' ) ;
18
+ resData . setReqBody ( true ) ;
17
19
this . callback ( undefined , resData ) ;
18
20
} ,
19
21
'and fields exist' : function ( err , resData ) {
@@ -32,6 +34,12 @@ vows.describe('Server').addBatch({
32
34
'and respRedirect' : function ( err , resData ) {
33
35
assert . equal ( resData . respRedirect ( ) , true ) ;
34
36
} ,
37
+ 'and dispPath' : function ( err , resData ) {
38
+ assert . equal ( resData . dispPath , '/tmp' ) ;
39
+ } ,
40
+ 'and reqBody' : function ( err , resData ) {
41
+ assert . equal ( resData . reqBody , true ) ;
42
+ } ,
35
43
'and statusCode' : function ( err , resData ) {
36
44
assert . equal ( resData . statusCode ( ) , 200 ) ;
37
45
}
You can’t perform that action at this time.
0 commit comments