@@ -122,6 +122,12 @@ describe('Project', () => {
122
122
userId : 40051332 ,
123
123
createdBy : 1 ,
124
124
updatedBy : 1 ,
125
+ } , {
126
+ projectId : project1 . id ,
127
+ role : 'member' ,
128
+ userId : 40051331 ,
129
+ createdBy : 1 ,
130
+ updatedBy : 1 ,
125
131
} ] ) ;
126
132
} ) . then ( ( ) => done ( ) ) ;
127
133
} ) ;
@@ -190,7 +196,7 @@ describe('Project', () => {
190
196
} )
191
197
. send ( {
192
198
param : {
193
- templateId : '2' ,
199
+ templateId : 2 ,
194
200
} ,
195
201
} )
196
202
. expect ( 'Content-Type' , / j s o n / )
@@ -202,7 +208,7 @@ describe('Project', () => {
202
208
const result = res . body . result ;
203
209
result . success . should . be . true ;
204
210
result . status . should . equal ( 200 ) ;
205
- result . content . templateId . should . not . equal ( '2' ) ;
211
+ result . content . templateId . should . equal ( project1 . templateId ) ;
206
212
done ( ) ;
207
213
}
208
214
} ) ;
@@ -216,7 +222,7 @@ describe('Project', () => {
216
222
} )
217
223
. send ( {
218
224
param : {
219
- templateId : '2' ,
225
+ templateId : 2 ,
220
226
} ,
221
227
} )
222
228
. expect ( 'Content-Type' , / j s o n / )
@@ -228,7 +234,7 @@ describe('Project', () => {
228
234
const result = res . body . result ;
229
235
result . success . should . be . true ;
230
236
result . status . should . equal ( 200 ) ;
231
- result . content . templateId . should . not . equal ( '2' ) ;
237
+ result . content . templateId . should . equal ( project1 . templateId ) ;
232
238
done ( ) ;
233
239
}
234
240
} ) ;
@@ -242,19 +248,19 @@ describe('Project', () => {
242
248
} )
243
249
. send ( {
244
250
param : {
245
- templateId : '2' ,
251
+ templateId : 2 ,
246
252
} ,
247
253
} )
248
254
. expect ( 'Content-Type' , / j s o n / )
249
- . expect ( 403 )
255
+ . expect ( 200 )
250
256
. end ( ( err , res ) => {
251
257
if ( err ) {
252
258
done ( err ) ;
253
259
} else {
254
260
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 ) ;
258
264
done ( ) ;
259
265
}
260
266
} ) ;
0 commit comments