File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,14 +5,16 @@ const makeObjectStub = () => {
55 status : 200 ,
66 data : {
77 serviceName : 'DatasetSP.save' ,
8- error : '' ,
8+ error : null ,
99 status : '1' ,
10- pendingPrinting : ' false' ,
10+ pendingPrinting : false ,
1111 transactionId : '6788329C5763C2982A9537E6DD1D122D' ,
1212 responseBody : {
13- total : '0' ,
13+ total : 0 ,
1414 entities : {
15- entity : { }
15+ entity : {
16+ data : ''
17+ }
1618 }
1719 }
1820 }
@@ -94,7 +96,10 @@ describe('validate', () => {
9496 const isValid = sut . isValid ( objectStub , [
9597 [ 'status' , 200 ] ,
9698 [ 'data.status' , '1' ] ,
97- [ 'data.responseBody.total' , '0' ]
99+ [ 'data.error' , null ] ,
100+ [ 'data.pendingPrinting' , false ] ,
101+ [ 'data.responseBody.total' , 0 ] ,
102+ [ 'data.responseBody.entities.entity.data' , '' ]
98103 ] )
99104 expect ( isValid ) . toBeTruthy ( )
100105 } )
@@ -117,7 +122,8 @@ describe('validate', () => {
117122 const isValid = sut . isValid ( objectStub , [
118123 [ 'status' , '' ] ,
119124 [ 'status' , 0 ] ,
120- [ 'status' , null ]
125+ [ 'status' , null ] ,
126+ [ 'status' , false ]
121127 ] )
122128 expect ( isValid ) . toBeFalsy ( )
123129 } )
You can’t perform that action at this time.
0 commit comments