@@ -122,6 +122,12 @@ describe('Project', () => {
122122 userId : 40051332 ,
123123 createdBy : 1 ,
124124 updatedBy : 1 ,
125+ } , {
126+ projectId : project1 . id ,
127+ role : 'member' ,
128+ userId : 40051331 ,
129+ createdBy : 1 ,
130+ updatedBy : 1 ,
125131 } ] ) ;
126132 } ) . then ( ( ) => done ( ) ) ;
127133 } ) ;
@@ -190,7 +196,7 @@ describe('Project', () => {
190196 } )
191197 . send ( {
192198 param : {
193- templateId : '2' ,
199+ templateId : 2 ,
194200 } ,
195201 } )
196202 . expect ( 'Content-Type' , / j s o n / )
@@ -202,7 +208,7 @@ describe('Project', () => {
202208 const result = res . body . result ;
203209 result . success . should . be . true ;
204210 result . status . should . equal ( 200 ) ;
205- result . content . templateId . should . not . equal ( '2' ) ;
211+ result . content . templateId . should . equal ( project1 . templateId ) ;
206212 done ( ) ;
207213 }
208214 } ) ;
@@ -216,7 +222,7 @@ describe('Project', () => {
216222 } )
217223 . send ( {
218224 param : {
219- templateId : '2' ,
225+ templateId : 2 ,
220226 } ,
221227 } )
222228 . expect ( 'Content-Type' , / j s o n / )
@@ -228,7 +234,7 @@ describe('Project', () => {
228234 const result = res . body . result ;
229235 result . success . should . be . true ;
230236 result . status . should . equal ( 200 ) ;
231- result . content . templateId . should . not . equal ( '2' ) ;
237+ result . content . templateId . should . equal ( project1 . templateId ) ;
232238 done ( ) ;
233239 }
234240 } ) ;
@@ -242,19 +248,19 @@ describe('Project', () => {
242248 } )
243249 . send ( {
244250 param : {
245- templateId : '2' ,
251+ templateId : 2 ,
246252 } ,
247253 } )
248254 . expect ( 'Content-Type' , / j s o n / )
249- . expect ( 403 )
255+ . expect ( 200 )
250256 . end ( ( err , res ) => {
251257 if ( err ) {
252258 done ( err ) ;
253259 } else {
254260 const result = res . body . result ;
255- result . success . should . be . false ;
256- result . status . should . equal ( 403 ) ;
257- result . content . message . should . equal ( 'You do not have permissions to perform this action' ) ;
261+ result . success . should . be . true ;
262+ result . status . should . equal ( 200 ) ;
263+ result . content . templateId . should . equal ( project1 . templateId ) ;
258264 done ( ) ;
259265 }
260266 } ) ;
0 commit comments