Skip to content
Snippets Groups Projects
Commit 148a953d authored by OZGCloud's avatar OZGCloud
Browse files

OZG-5151 remove mockClear() call

parent 203ff8a6
No related branches found
No related tags found
No related merge requests found
...@@ -2,17 +2,19 @@ import { TestBed } from '@angular/core/testing'; ...@@ -2,17 +2,19 @@ import { TestBed } from '@angular/core/testing';
import { Dialog, DialogConfig } from '@angular/cdk/dialog'; import { Dialog, DialogConfig } from '@angular/cdk/dialog';
import { OzgcloudDialogService } from './ozgcloud-dialog.service'; import { OzgcloudDialogService } from './ozgcloud-dialog.service';
import { mock } from '@alfa-client/test-utils'; import { Mock, mock } from '@alfa-client/test-utils';
describe('OzgcloudDialogService', () => { describe('OzgcloudDialogService', () => {
let service: OzgcloudDialogService; let service: OzgcloudDialogService;
let dialog: Mock<Dialog>;
const component = <any>{ name: 'Component' }; const component = <any>{ name: 'Component' };
const dialog = mock(Dialog);
const dialogData = { id: 'ZumBeispiel' }; const dialogData = { id: 'ZumBeispiel' };
const dialogConfigWithData: DialogConfig = { data: dialogData }; const dialogConfigWithData: DialogConfig = { data: dialogData };
beforeEach(() => { beforeEach(() => {
dialog = mock(Dialog);
TestBed.configureTestingModule({ TestBed.configureTestingModule({
providers: [ providers: [
{ {
...@@ -29,10 +31,6 @@ describe('OzgcloudDialogService', () => { ...@@ -29,10 +31,6 @@ describe('OzgcloudDialogService', () => {
}); });
describe('open', () => { describe('open', () => {
beforeEach(() => {
dialog.open.mockClear();
});
it('should open dialog with data', () => { it('should open dialog with data', () => {
service.open(component, dialogData); service.open(component, dialogData);
...@@ -47,10 +45,6 @@ describe('OzgcloudDialogService', () => { ...@@ -47,10 +45,6 @@ describe('OzgcloudDialogService', () => {
}); });
describe('openWizard', () => { describe('openWizard', () => {
beforeEach(() => {
dialog.open.mockClear();
});
it('should open wizard dialog', () => { it('should open wizard dialog', () => {
service.openWizard(component); service.openWizard(component);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment