Skip to content

Commit aad74a5

Browse files
committed
fix: TT-310 Testing implementation fixed
1 parent ae1039f commit aad74a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/modules/users/store/user.effects.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)