Skip to content
Snippets Groups Projects
Commit 6f937d8b authored by OZGCloud's avatar OZGCloud
Browse files

OZG-4310 small fix

parent d1187aea
Branches
Tags
No related merge requests found
......@@ -131,17 +131,17 @@ describe('AppComponent', () => {
});
it('should call removeAuthenticationParams', () => {
component.removeAuthenticationParams = jest.fn();
component.forwardWithoutAuthenticationParams = jest.fn();
component.doAfterLoggedIn();
expect(component.removeAuthenticationParams).toHaveBeenCalled();
expect(component.forwardWithoutAuthenticationParams).toHaveBeenCalled();
});
});
describe('removeAuthenticationParams', () => {
describe('forward without authentication params', () => {
it('should navigate to same route without authentication params', () => {
component.removeAuthenticationParams();
component.forwardWithoutAuthenticationParams();
expect(router.navigate).toHaveBeenCalledWith([], { queryParams: {} });
});
......
......@@ -28,10 +28,10 @@ export class AppComponent implements OnInit {
doAfterLoggedIn(): void {
this.apiRootStateResource$ = this.apiRootService.getApiRoot();
this.removeAuthenticationParams();
this.forwardWithoutAuthenticationParams();
}
removeAuthenticationParams() {
forwardWithoutAuthenticationParams() {
const queryParams = this.getQueryParamsWithoutAuthentication();
this.router.navigate([], { queryParams });
}
......
......@@ -9,7 +9,6 @@ import { MockComponent } from 'ng-mocks';
import { of } from 'rxjs';
import { createInvalidParam, createProblemDetail } from '../../../../../../../tech-shared/test/error';
import { createAdminOrganisationsEinheitResource } from '../../../../../test/organisations-einheit/organisations-einheit';
import { TextFieldComponent } from '../../../shared/text-field/text-field.component';
import { OrganisationsEinheitService } from '../../organisationseinheit.service';
import { OrganisationsEinheitFormComponent } from './organisationseinheit-form.component';
import { OrganisationsEinheitSignaturComponent } from './organisationseinheit-signatur/organisationseinheit-signatur.component';
......@@ -31,7 +30,6 @@ describe('OrganisationsEinheitFormComponent', () => {
await TestBed.configureTestingModule({
declarations: [
OrganisationsEinheitFormComponent,
MockComponent(TextFieldComponent),
MockComponent(OrganisationsEinheitSignaturComponent),
MockComponent(ButtonWithSpinnerComponent),
],
......
......@@ -9,7 +9,6 @@ import { singleCold } from 'libs/tech-shared/test/marbles';
import { MockComponent } from 'ng-mocks';
import { EMPTY } from 'rxjs';
import { createPostfachResource } from '../../../../../test/postfach/postfach';
import { TextFieldComponent } from '../../../shared/text-field/text-field.component';
import { PostfachResource } from '../../postfach.model';
import { PostfachService } from '../../postfach.service';
import { PostfachFormComponent } from './postfach-form.component';
......@@ -28,12 +27,7 @@ describe('PostfachFormComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [
PostfachFormComponent,
MockComponent(TextFieldComponent),
MockComponent(PostfachSignaturComponent),
MockComponent(ButtonWithSpinnerComponent),
],
declarations: [PostfachFormComponent, MockComponent(PostfachSignaturComponent), MockComponent(ButtonWithSpinnerComponent)],
imports: [ReactiveFormsModule, FormsModule],
providers: [
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment