@@ -57,7 +57,7 @@ describe.sequential('External DB Sync - Advanced Tests', () => {
5757 }
5858 } ) ;
5959
60- const userA = await User . create ( { emailAddress : 'user-a@example.com' } ) ;
60+ const userA = await User . create ( { primary_email : 'user-a@example.com' } ) ;
6161 await niceBackendFetch ( `/api/v1/users/${ userA . userId } ` , {
6262 accessType : 'admin' ,
6363 method : 'PATCH' ,
@@ -79,7 +79,7 @@ describe.sequential('External DB Sync - Advanced Tests', () => {
7979 }
8080 } ) ;
8181
82- const userB = await User . create ( { emailAddress : 'user-b@example.com' } ) ;
82+ const userB = await User . create ( { primary_email : 'user-b@example.com' } ) ;
8383 await niceBackendFetch ( `/api/v1/users/${ userB . userId } ` , {
8484 accessType : 'admin' ,
8585 method : 'PATCH' ,
@@ -178,9 +178,9 @@ describe.sequential('External DB Sync - Advanced Tests', () => {
178178
179179 const client = dbManager . getClient ( dbName ) ;
180180
181- const user1 = await User . create ( { emailAddress : 'seq1@example.com' } ) ;
182- const user2 = await User . create ( { emailAddress : 'seq2@example.com' } ) ;
183- const user3 = await User . create ( { emailAddress : 'seq3@example.com' } ) ;
181+ const user1 = await User . create ( { primary_email : 'seq1@example.com' } ) ;
182+ const user2 = await User . create ( { primary_email : 'seq2@example.com' } ) ;
183+ const user3 = await User . create ( { primary_email : 'seq3@example.com' } ) ;
184184
185185 await niceBackendFetch ( `/api/v1/users/${ user1 . userId } ` , {
186186 accessType : 'admin' ,
@@ -219,7 +219,7 @@ describe.sequential('External DB Sync - Advanced Tests', () => {
219219 const seq1 = Number ( metadata1 . rows [ 0 ] . last_synced_sequence_id ) ;
220220 expect ( seq1 ) . toBeGreaterThan ( 0 ) ;
221221
222- const user4 = await User . create ( { emailAddress : 'seq4@example.com' } ) ;
222+ const user4 = await User . create ( { primary_email : 'seq4@example.com' } ) ;
223223 await niceBackendFetch ( `/api/v1/users/${ user4 . userId } ` , {
224224 accessType : 'admin' ,
225225 method : 'PATCH' ,
@@ -260,7 +260,7 @@ describe.sequential('External DB Sync - Advanced Tests', () => {
260260 }
261261 } ) ;
262262
263- const user1 = await User . create ( { emailAddress : 'user1@example.com' } ) ;
263+ const user1 = await User . create ( { primary_email : 'user1@example.com' } ) ;
264264 await niceBackendFetch ( `/api/v1/users/${ user1 . userId } ` , {
265265 accessType : 'admin' ,
266266 method : 'PATCH' ,
@@ -276,7 +276,7 @@ describe.sequential('External DB Sync - Advanced Tests', () => {
276276 expect ( res . rows [ 0 ] . display_name ) . toBe ( 'User 1' ) ;
277277 const user1Id = res . rows [ 0 ] . id ;
278278
279- const user2 = await User . create ( { emailAddress : 'user2@example.com' } ) ;
279+ const user2 = await User . create ( { primary_email : 'user2@example.com' } ) ;
280280 await niceBackendFetch ( `/api/v1/users/${ user2 . userId } ` , {
281281 accessType : 'admin' ,
282282 method : 'PATCH' ,
@@ -316,7 +316,7 @@ describe.sequential('External DB Sync - Advanced Tests', () => {
316316 } ) ;
317317
318318 const specialName = "O'Connor 🚀 用户 \"Test\"" ;
319- const user = await User . create ( { emailAddress : 'special@example.com' } ) ;
319+ const user = await User . create ( { primary_email : 'special@example.com' } ) ;
320320 await niceBackendFetch ( `/api/v1/users/${ user . userId } ` , {
321321 accessType : 'admin' ,
322322 method : 'PATCH' ,
@@ -456,9 +456,9 @@ describe.sequential('External DB Sync - Advanced Tests', () => {
456456 }
457457 } ) ;
458458
459- const user1 = await User . create ( { emailAddress : 'seq1@example.com' } ) ;
460- const user2 = await User . create ( { emailAddress : 'seq2@example.com' } ) ;
461- const user3 = await User . create ( { emailAddress : 'seq3@example.com' } ) ;
459+ const user1 = await User . create ( { primary_email : 'seq1@example.com' } ) ;
460+ const user2 = await User . create ( { primary_email : 'seq2@example.com' } ) ;
461+ const user3 = await User . create ( { primary_email : 'seq3@example.com' } ) ;
462462
463463 await niceBackendFetch ( `/api/v1/users/${ user1 . userId } ` , {
464464 accessType : 'admin' ,
@@ -505,7 +505,7 @@ describe.sequential('External DB Sync - Advanced Tests', () => {
505505 method : 'DELETE' ,
506506 } ) ;
507507
508- const user4 = await User . create ( { emailAddress : 'seq4@example.com' } ) ;
508+ const user4 = await User . create ( { primary_email : 'seq4@example.com' } ) ;
509509 await niceBackendFetch ( `/api/v1/users/${ user4 . userId } ` , {
510510 accessType : 'admin' ,
511511 method : 'PATCH' ,
@@ -568,7 +568,7 @@ describe.sequential('External DB Sync - Advanced Tests', () => {
568568
569569 const superClient = dbManager . getClient ( dbName ) ;
570570
571- const user = await User . create ( { emailAddress : 'write-protect@example.com' } ) ;
571+ const user = await User . create ( { primary_email : 'write-protect@example.com' } ) ;
572572 await niceBackendFetch ( `/api/v1/users/${ user . userId } ` , {
573573 accessType : 'admin' ,
574574 method : 'PATCH' ,
@@ -645,7 +645,7 @@ $$;`);
645645
646646 const client = dbManager . getClient ( dbName ) ;
647647
648- const user = await User . create ( { emailAddress : 'multi-update@example.com' } ) ;
648+ const user = await User . create ( { primary_email : 'multi-update@example.com' } ) ;
649649
650650 await niceBackendFetch ( `/api/v1/users/${ user . userId } ` , {
651651 accessType : 'admin' ,
@@ -695,7 +695,7 @@ $$;`);
695695
696696 const client = dbManager . getClient ( dbName ) ;
697697
698- const user = await User . create ( { emailAddress : 'delete-before-sync@example.com' } ) ;
698+ const user = await User . create ( { primary_email : 'delete-before-sync@example.com' } ) ;
699699 await niceBackendFetch ( `/api/v1/users/${ user . userId } ` , {
700700 accessType : 'admin' ,
701701 method : 'PATCH' ,
@@ -748,7 +748,7 @@ $$;`);
748748 const client = dbManager . getClient ( dbName ) ;
749749 const email = 'recreate-after-delete@example.com' ;
750750
751- const firstUser = await User . create ( { emailAddress : email } ) ;
751+ const firstUser = await User . create ( { primary_email : email } ) ;
752752 await niceBackendFetch ( `/api/v1/users/${ firstUser . userId } ` , {
753753 accessType : 'admin' ,
754754 method : 'PATCH' ,
@@ -772,7 +772,7 @@ $$;`);
772772 await waitForSyncedDeletion ( client , email ) ;
773773 await verifyNotInExternalDb ( client , email ) ;
774774
775- const secondUser = await User . create ( { emailAddress : email } ) ;
775+ const secondUser = await User . create ( { primary_email : email } ) ;
776776 await niceBackendFetch ( `/api/v1/users/${ secondUser . userId } ` , {
777777 accessType : 'admin' ,
778778 method : 'PATCH' ,
@@ -825,7 +825,7 @@ $$;`);
825825 const client = dbManager . getClient ( dbName ) ;
826826 const email = 'lifecycle-test@example.com' ;
827827
828- const user1 = await User . create ( { emailAddress : email } ) ;
828+ const user1 = await User . create ( { primary_email : email } ) ;
829829 await niceBackendFetch ( `/api/v1/users/${ user1 . userId } ` , {
830830 accessType : 'admin' ,
831831 method : 'PATCH' ,
@@ -875,7 +875,7 @@ $$;`);
875875 res = await client . query ( `SELECT * FROM "users" WHERE "primary_email" = $1` , [ email ] ) ;
876876 expect ( res . rows . length ) . toBe ( 0 ) ;
877877
878- const user2 = await User . create ( { emailAddress : email } ) ;
878+ const user2 = await User . create ( { primary_email : email } ) ;
879879 await niceBackendFetch ( `/api/v1/users/${ user2 . userId } ` , {
880880 accessType : 'admin' ,
881881 method : 'PATCH' ,
0 commit comments