File tree 1 file changed +0
-10
lines changed
1 file changed +0
-10
lines changed Original file line number Diff line number Diff line change @@ -498,10 +498,8 @@ describe("Nostr NIP 05 API tests", () => {
498
498
} ) ;
499
499
500
500
it ( "should delete all data associated with a given pubkey but not affect other pubkeys" , async ( ) => {
501
- // Arrange
502
501
const repo = new NameRecordRepository ( redisClient ) ;
503
502
504
- // Create NameRecords with different pubkeys
505
503
const record1 = new NameRecord (
506
504
"user1" ,
507
505
"pubkey1" ,
@@ -529,28 +527,20 @@ describe("Nostr NIP 05 API tests", () => {
529
527
new Date ( ) . toISOString ( )
530
528
) ;
531
529
532
- // Save the records
533
530
await repo . save ( record1 ) ;
534
531
await repo . save ( record2 ) ;
535
532
await repo . save ( record3 ) ;
536
533
537
- // Act
538
- // Delete by pubkey1
539
534
await repo . deleteByPubkey ( "pubkey1" ) ;
540
535
541
- // Assert
542
- // Verify that records with pubkey1 are deleted
543
536
const fetchedRecord1 = await repo . findByName ( "user1" ) ;
544
537
const fetchedRecord3 = await repo . findByName ( "user3" ) ;
545
538
546
539
expect ( fetchedRecord1 ) . toBeNull ( ) ;
547
540
expect ( fetchedRecord3 ) . toBeNull ( ) ;
548
541
549
- // Verify that records with pubkey2 are still present
550
542
const fetchedRecord2 = await repo . findByName ( "user2" ) ;
551
543
552
544
expect ( fetchedRecord2 ) . not . toBeNull ( ) ;
553
- expect ( fetchedRecord2 . name ) . toEqual ( "user2" ) ;
554
- expect ( fetchedRecord2 . pubkey ) . toEqual ( "pubkey2" ) ;
555
545
} ) ;
556
546
} ) ;
You can’t perform that action at this time.
0 commit comments