Skip to content
Snippets Groups Projects
Commit 9f773156 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-3574 Refactor unit test

parent 968e262b
No related branches found
No related tags found
No related merge requests found
......@@ -26,9 +26,9 @@ import { faker } from '@faker-js/faker';
import { ApiRootService } from '@goofy-client/api-root-shared';
import { CommandListResource, CommandResource, CommandService } from '@goofy-client/command-shared';
import { NavigationService } from '@goofy-client/navigation-shared';
import { createEmptyStateResource, createStateResource, StateResource } from '@goofy-client/tech-shared';
import { ApiError, StateResource, createEmptyStateResource, createErrorStateResource, createStateResource } from '@goofy-client/tech-shared';
import { Mock, mock, useFromMock } from '@goofy-client/test-utils';
import { getUrl, ResourceUri } from '@ngxp/rest';
import { ResourceUri, getUrl } from '@ngxp/rest';
import { cold } from 'jest-marbles';
import { createBinaryFileListResource } from 'libs/binary-file-shared/test/binary-file';
import { CommandLinkRel } from 'libs/command-shared/src/lib/command.linkrel';
......@@ -135,10 +135,11 @@ describe('VorgangService', () => {
describe('handleError', () => {
it('should call setVorgangWithEingang', () => {
service.setVorgangWithEingang = jest.fn();
const resource = createErrorStateResource(<ApiError>{});
service.handleError();
expect(service.setVorgangWithEingang).toHaveBeenCalled();
expect(service.setVorgangWithEingang).toHaveBeenCalledWith(resource);
})
it('should return EMPTY', () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment