Skip to content
Snippets Groups Projects
Commit b48f2819 authored by Albert Bruns's avatar Albert Bruns
Browse files

OZG-7974 small fix

parent fbd959ec
No related branches found
No related tags found
1 merge request!116OZG-7974-Validierung-onSubmit
...@@ -111,6 +111,7 @@ describe('UserFormService', () => { ...@@ -111,6 +111,7 @@ describe('UserFormService', () => {
describe('init', () => { describe('init', () => {
beforeEach(() => { beforeEach(() => {
service._initOrganisationsEinheiten = jest.fn().mockReturnValue(of()); service._initOrganisationsEinheiten = jest.fn().mockReturnValue(of());
service._updateAlfaCheckboxStatesOnPatch = jest.fn().mockReturnValue(of());
}); });
it('should call initOrganisationsEinheiten', () => { it('should call initOrganisationsEinheiten', () => {
...@@ -126,8 +127,6 @@ describe('UserFormService', () => { ...@@ -126,8 +127,6 @@ describe('UserFormService', () => {
}); });
it('should call updateAlfaCheckboxStatesOnPatch', () => { it('should call updateAlfaCheckboxStatesOnPatch', () => {
service._updateAlfaCheckboxStatesOnPatch = jest.fn();
service.init(); service.init();
expect(service._updateAlfaCheckboxStatesOnPatch).toHaveBeenCalled(); expect(service._updateAlfaCheckboxStatesOnPatch).toHaveBeenCalled();
...@@ -514,8 +513,8 @@ describe('UserFormService', () => { ...@@ -514,8 +513,8 @@ describe('UserFormService', () => {
service._initOrganisationsEinheiten$ = new Subscription(); service._initOrganisationsEinheiten$ = new Subscription();
service._initOrganisationsEinheiten$.unsubscribe = jest.fn(); service._initOrganisationsEinheiten$.unsubscribe = jest.fn();
service._alfaGroupChanges = new Subscription(); service._updateAlfaCheckboxesOnPatch$ = new Subscription();
service._alfaGroupChanges.unsubscribe = jest.fn(); service._updateAlfaCheckboxesOnPatch$.unsubscribe = jest.fn();
}); });
it('should unsubscribe from initOrganisationsEinheiten$', () => { it('should unsubscribe from initOrganisationsEinheiten$', () => {
...@@ -524,10 +523,10 @@ describe('UserFormService', () => { ...@@ -524,10 +523,10 @@ describe('UserFormService', () => {
expect(service._initOrganisationsEinheiten$.unsubscribe).toHaveBeenCalled(); expect(service._initOrganisationsEinheiten$.unsubscribe).toHaveBeenCalled();
}); });
it('should unsubscribe from initOrganisationsEinheiten$', () => { it('should unsubscribe from updateAlfaCheckboxesOnPatch$', () => {
service.ngOnDestroy(); service.ngOnDestroy();
expect(service._alfaGroupChanges.unsubscribe).toHaveBeenCalled(); expect(service._updateAlfaCheckboxesOnPatch$.unsubscribe).toHaveBeenCalled();
}); });
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment