File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/app/modules/users/store Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -173,9 +173,9 @@ describe('UserEffects', () => {
173173 } ) ;
174174
175175 spyOn ( toastrService , 'success' ) ;
176- spyOn ( service , 'revokeRole' ) . and . returnValue ( throwError ( { error : { message : 'error' } } ) ) ;
176+ spyOn ( service , 'revokeRole' ) . and . returnValue ( of ( user ) ) ;
177177
178- effects . grantUserRole $. subscribe ( ( action ) => {
178+ effects . revokeUserRole $. subscribe ( ( action ) => {
179179 expect ( toastrService . success ) . toHaveBeenCalledWith ( 'User role successfully revoked' ) ;
180180 expect ( action . type ) . toEqual ( UserActionTypes . REVOKE_USER_ROLE_SUCCESS ) ;
181181 } ) ;
@@ -194,7 +194,7 @@ describe('UserEffects', () => {
194194 spyOn ( toastrService , 'error' ) ;
195195 spyOn ( service , 'revokeRole' ) . and . returnValue ( throwError ( { error : { message : 'error' } } ) ) ;
196196
197- effects . grantUserRole $. subscribe ( ( action ) => {
197+ effects . revokeUserRole $. subscribe ( ( action ) => {
198198 expect ( toastrService . error ) . toHaveBeenCalled ( ) ;
199199 expect ( action . type ) . toEqual ( UserActionTypes . REVOKE_USER_ROLE_FAIL ) ;
200200 } ) ;
You can’t perform that action at this time.
0 commit comments