@@ -1076,7 +1076,7 @@ describe('AbacService (unit)', () => {
10761076 ) ;
10771077 } ) ;
10781078
1079- it ( 'rejects with error-usernames-not-matching- abac-attributes and details for non-compliant users' , async ( ) => {
1079+ it ( 'rejects with error-only-compliant-users-can-be-added-to- abac-rooms and details for non-compliant users' , async ( ) => {
10801080 const usernames = [ 'alice' , 'bob' , 'charlie' ] ;
10811081 const nonCompliantDocs = [ { username : 'bob' } , { username : 'charlie' } ] ;
10821082 mockUsersFind . mockImplementationOnce ( ( ) => ( {
@@ -1086,9 +1086,7 @@ describe('AbacService (unit)', () => {
10861086 } ) ) ;
10871087
10881088 await expect ( service . checkUsernamesMatchAttributes ( usernames , attributes as any , 'objectId' ) ) . rejects . toMatchObject ( {
1089- error : 'error-usernames-not-matching-abac-attributes' ,
1090- message : expect . stringContaining ( '[error-usernames-not-matching-abac-attributes]' ) ,
1091- details : expect . arrayContaining ( [ 'bob' , 'charlie' ] ) ,
1089+ code : 'error-only-compliant-users-can-be-added-to-abac-rooms' ,
10921090 } ) ;
10931091 } ) ;
10941092
@@ -1119,7 +1117,7 @@ describe('AbacService (unit)', () => {
11191117 } ) ) ;
11201118
11211119 await expect ( service . checkUsernamesMatchAttributes ( usernames , attributes as any , 'objectId' ) ) . rejects . toMatchObject ( {
1122- error : 'error-usernames-not-matching- abac-attributes ' ,
1120+ code : 'error-only-compliant-users-can-be-added-to- abac-rooms ' ,
11231121 } ) ;
11241122
11251123 expect ( mockCreateAuditServerEvent ) . not . toHaveBeenCalled ( ) ;
0 commit comments