Skip to content
Snippets Groups Projects
Commit 90e7d0b3 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-6499 fix broken test

parent 3b89a7ab
No related branches found
No related tags found
No related merge requests found
...@@ -21,12 +21,6 @@ ...@@ -21,12 +21,6 @@
* Die sprachspezifischen Genehmigungen und Beschränkungen * Die sprachspezifischen Genehmigungen und Beschränkungen
* unter der Lizenz sind dem Lizenztext zu entnehmen. * unter der Lizenz sind dem Lizenztext zu entnehmen.
*/ */
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { PostfachService } from '@alfa-client/postfach-shared'; import { PostfachService } from '@alfa-client/postfach-shared';
import { createStateResource } from '@alfa-client/tech-shared'; import { createStateResource } from '@alfa-client/tech-shared';
import { Mock, mock, useFromMock } from '@alfa-client/test-utils'; import { Mock, mock, useFromMock } from '@alfa-client/test-utils';
...@@ -39,8 +33,14 @@ import { ...@@ -39,8 +33,14 @@ import {
TextAreaEditorComponent, TextAreaEditorComponent,
TextEditorComponent, TextEditorComponent,
} from '@alfa-client/ui'; } from '@alfa-client/ui';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { createCommandResource } from 'libs/command-shared/test/command'; import { createCommandResource } from 'libs/command-shared/test/command';
import { PostfachTestFactory } from 'libs/postfach-shared/test/postfach'; import { PostfachTestFactory, createPostfachSettings } from 'libs/postfach-shared/test/postfach';
import { MockComponent } from 'ng-mocks'; import { MockComponent } from 'ng-mocks';
import { of } from 'rxjs'; import { of } from 'rxjs';
import { PostfachMailFormComponent } from './postfach-mail-form.component'; import { PostfachMailFormComponent } from './postfach-mail-form.component';
...@@ -54,7 +54,10 @@ describe('PostfachMailFormComponent', () => { ...@@ -54,7 +54,10 @@ describe('PostfachMailFormComponent', () => {
let component: PostfachMailFormComponent; let component: PostfachMailFormComponent;
let fixture: ComponentFixture<PostfachMailFormComponent>; let fixture: ComponentFixture<PostfachMailFormComponent>;
const postfachService: Mock<PostfachService> = mock(PostfachService); const postfachService: Mock<PostfachService> = {
...mock(PostfachService),
getSettings: jest.fn().mockReturnValue(of(createPostfachSettings())),
};
const formService: PostfachMailFormservice = new PostfachMailFormservice( const formService: PostfachMailFormservice = new PostfachMailFormservice(
new FormBuilder(), new FormBuilder(),
useFromMock(postfachService), useFromMock(postfachService),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment