@@ -442,31 +442,32 @@ describe('LIST Project', () => {
442
442
const resJson = res . body ;
443
443
should . exist ( resJson ) ;
444
444
resJson . should . have . lengthOf ( 3 ) ;
445
- resJson [ 0 ] . should . have . property ( 'attachments' ) ;
446
- resJson [ 0 ] . attachments . should . have . lengthOf ( 2 ) ;
447
- resJson [ 0 ] . attachments [ 0 ] . should . have . property ( 'id' ) ;
448
- resJson [ 0 ] . attachments [ 0 ] . should . have . property ( 'projectId' ) ;
449
- resJson [ 0 ] . attachments [ 0 ] . should . have . property ( 'title' ) ;
450
- resJson [ 0 ] . attachments [ 0 ] . should . have . property ( 'description' ) ;
451
- resJson [ 0 ] . attachments [ 0 ] . should . have . property ( 'path' ) ;
452
- resJson [ 0 ] . attachments [ 0 ] . should . have . property ( 'type' ) ;
453
- resJson [ 0 ] . attachments [ 0 ] . should . have . property ( 'tags' ) ;
454
- resJson [ 0 ] . attachments [ 0 ] . should . have . property ( 'contentType' ) ;
455
- resJson [ 0 ] . attachments [ 0 ] . should . have . property ( 'createdBy' ) ;
456
- resJson [ 0 ] . attachments [ 0 ] . should . have . property ( 'updatedBy' ) ;
445
+ const project = _ . find ( resJson , { id : project1 . id } ) ;
446
+ project . should . have . property ( 'attachments' ) ;
447
+ project . attachments . should . have . lengthOf ( 2 ) ;
448
+ project . attachments [ 0 ] . should . have . property ( 'id' ) ;
449
+ project . attachments [ 0 ] . should . have . property ( 'projectId' ) ;
450
+ project . attachments [ 0 ] . should . have . property ( 'title' ) ;
451
+ project . attachments [ 0 ] . should . have . property ( 'description' ) ;
452
+ project . attachments [ 0 ] . should . have . property ( 'path' ) ;
453
+ project . attachments [ 0 ] . should . have . property ( 'type' ) ;
454
+ project . attachments [ 0 ] . should . have . property ( 'tags' ) ;
455
+ project . attachments [ 0 ] . should . have . property ( 'contentType' ) ;
456
+ project . attachments [ 0 ] . should . have . property ( 'createdBy' ) ;
457
+ project . attachments [ 0 ] . should . have . property ( 'updatedBy' ) ;
457
458
458
- resJson [ 0 ] . attachments [ 1 ] . should . have . property ( 'id' ) ;
459
- resJson [ 0 ] . attachments [ 1 ] . should . have . property ( 'projectId' ) ;
460
- resJson [ 0 ] . attachments [ 1 ] . should . have . property ( 'title' ) ;
461
- resJson [ 0 ] . attachments [ 1 ] . should . have . property ( 'description' ) ;
462
- resJson [ 0 ] . attachments [ 1 ] . should . have . property ( 'path' ) ;
463
- resJson [ 0 ] . attachments [ 1 ] . should . have . property ( 'type' ) ;
464
- resJson [ 0 ] . attachments [ 1 ] . should . have . property ( 'tags' ) ;
465
- resJson [ 0 ] . attachments [ 1 ] . should . have . property ( 'createdBy' ) ;
466
- resJson [ 0 ] . attachments [ 1 ] . should . have . property ( 'updatedBy' ) ;
459
+ project . attachments [ 1 ] . should . have . property ( 'id' ) ;
460
+ project . attachments [ 1 ] . should . have . property ( 'projectId' ) ;
461
+ project . attachments [ 1 ] . should . have . property ( 'title' ) ;
462
+ project . attachments [ 1 ] . should . have . property ( 'description' ) ;
463
+ project . attachments [ 1 ] . should . have . property ( 'path' ) ;
464
+ project . attachments [ 1 ] . should . have . property ( 'type' ) ;
465
+ project . attachments [ 1 ] . should . have . property ( 'tags' ) ;
466
+ project . attachments [ 1 ] . should . have . property ( 'createdBy' ) ;
467
+ project . attachments [ 1 ] . should . have . property ( 'updatedBy' ) ;
467
468
468
- resJson [ 0 ] . should . have . property ( 'description' ) ;
469
- resJson [ 0 ] . should . have . property ( 'billingAccountId' ) ;
469
+ project . should . have . property ( 'description' ) ;
470
+ project . should . have . property ( 'billingAccountId' ) ;
470
471
done ( ) ;
471
472
}
472
473
} ) ;
@@ -1112,7 +1113,6 @@ describe('LIST Project', () => {
1112
1113
resJson [ 0 ] . name . should . equal ( 'test1' ) ;
1113
1114
resJson [ 0 ] . invites . should . have . lengthOf ( 2 ) ;
1114
1115
resJson [ 0 ] . invites [ 0 ] . should . have . property ( 'email' ) ;
1115
- should . not . exist ( resJson [ 0 ] . invites [ 0 ] . userId ) ;
1116
1116
resJson [ 0 ] . invites [ 1 ] . email . should . equal ( 'h***o@w***d.com' ) ;
1117
1117
done ( ) ;
1118
1118
}
0 commit comments