@@ -26,6 +26,7 @@ describe('Admin - Users API', () => {
26
26
Organization . truncate ( { force : true , cascade : true } ) ,
27
27
OrganizationRole . truncate ( { force : true , cascade : true } ) ,
28
28
User . truncate ( { force : true , cascade : true } ) ,
29
+ UAAIdentity . truncate ( { force : true , cascade : true } ) ,
29
30
] )
30
31
) ;
31
32
@@ -72,10 +73,10 @@ describe('Admin - Users API', () => {
72
73
73
74
it ( 'returns all users' , async ( ) => {
74
75
const user1 = await factory . user ( ) ;
75
- createUAAIdentity ( { uaaId : 'user_id_1' , email : 'user1@example.com' , userId : user1 . id } ) ;
76
+ await createUAAIdentity ( { uaaId : 'user_id_1' , email : 'user1@example.com' , userId : user1 . id } ) ;
76
77
77
78
const user2 = await factory . user ( ) ;
78
- createUAAIdentity ( { uaaId : 'user_id_2' , email : 'user2@example.com' , userId : user2 . id } ) ;
79
+ await createUAAIdentity ( { uaaId : 'user_id_2' , email : 'user2@example.com' , userId : user2 . id } ) ;
79
80
80
81
const org1 = await factory . organization . create ( ) ;
81
82
const org2 = await factory . organization . create ( ) ;
@@ -120,10 +121,10 @@ describe('Admin - Users API', () => {
120
121
121
122
it ( 'returns all users with UAA identities' , async ( ) => {
122
123
const user1 = await factory . user ( ) ;
123
- createUAAIdentity ( { uaaId : 'user_id_1' , email : 'user1@example.com' , userId : user1 . id } ) ;
124
+ await createUAAIdentity ( { uaaId : 'user_id_1' , email : 'user1@example.com' , userId : user1 . id } ) ;
124
125
125
126
const user2 = await factory . user ( ) ;
126
- createUAAIdentity ( { uaaId : 'user_id_2' , email : 'user2@example.com' , userId : user2 . id } ) ;
127
+ await createUAAIdentity ( { uaaId : 'user_id_2' , email : 'user2@example.com' , userId : user2 . id } ) ;
127
128
128
129
const user3 = await factory . user ( ) ;
129
130
const user4 = await factory . user ( ) ;
@@ -165,10 +166,10 @@ describe('Admin - Users API', () => {
165
166
166
167
it ( 'returns all users with UAA identities' , async ( ) => {
167
168
const user1 = await factory . user ( ) ;
168
- createUAAIdentity ( { uaaId : 'user_id_1' , email : 'user1@example.com' , userId : user1 . id } ) ;
169
+ await createUAAIdentity ( { uaaId : 'user_id_1' , email : 'user1@example.com' , userId : user1 . id } ) ;
169
170
170
171
const user2 = await factory . user ( ) ;
171
- createUAAIdentity ( { uaaId : 'user_id_2' , email : 'user2@example.com' , userId : user2 . id } ) ;
172
+ await createUAAIdentity ( { uaaId : 'user_id_2' , email : 'user2@example.com' , userId : user2 . id } ) ;
172
173
173
174
const user3 = await factory . user ( ) ;
174
175
const user4 = await factory . user ( ) ;
0 commit comments