@@ -72,7 +72,7 @@ describe('User Tests', () => {
7272
7373 await expect (
7474 async ( ) => await UsersService . updateUserRole ( guest . userId , leadership , RoleEnum . HEAD , organization )
75- ) . rejects . toThrow ( new AccessDeniedException ( 'Guests, members, and leadership cannot update user roles! ' ) ) ;
75+ ) . rejects . toThrow ( new AccessDeniedException ( 'Cannot promote someone to your own role or higher ' ) ) ;
7676 } ) ;
7777
7878 it ( 'prevents leadership from promoting member to higher role' , async ( ) => {
@@ -81,7 +81,7 @@ describe('User Tests', () => {
8181
8282 await expect (
8383 async ( ) => await UsersService . updateUserRole ( memberUser . userId , leadership , RoleEnum . HEAD , organization )
84- ) . rejects . toThrow ( new AccessDeniedException ( 'Guests, members, and leadership cannot update user roles! ' ) ) ;
84+ ) . rejects . toThrow ( new AccessDeniedException ( 'Cannot promote someone to your own role or higher ' ) ) ;
8585 } ) ;
8686
8787 it ( 'allows head to promote guest to member (existing functionality)' , async ( ) => {
@@ -107,7 +107,7 @@ describe('User Tests', () => {
107107
108108 await expect (
109109 async ( ) => await UsersService . updateUserRole ( guest2 . userId , guest1 , RoleEnum . MEMBER , organization )
110- ) . rejects . toThrow ( new AccessDeniedException ( 'Guests, members, and leadership cannot update user roles!' ) ) ;
110+ ) . rejects . toThrow ( new AccessDeniedException ( 'Guests and members cannot update user roles!' ) ) ;
111111 } ) ;
112112
113113 it ( 'prevents member from updating any user role' , async ( ) => {
@@ -116,7 +116,7 @@ describe('User Tests', () => {
116116
117117 await expect (
118118 async ( ) => await UsersService . updateUserRole ( guest . userId , memberUser , RoleEnum . MEMBER , organization )
119- ) . rejects . toThrow ( new AccessDeniedException ( 'Guests, members, and leadership cannot update user roles!' ) ) ;
119+ ) . rejects . toThrow ( new AccessDeniedException ( 'Guests and members cannot update user roles!' ) ) ;
120120 } ) ;
121121 } ) ;
122122} ) ;
0 commit comments