diff --git a/alfa-client/libs/postfach-shared/src/lib/postfach.repository.spec.ts b/alfa-client/libs/postfach-shared/src/lib/postfach.repository.spec.ts index c67a73ad7045df1fa47596e1e45a0d8b4a35fba1..377719bb0187815df301380b394fd0e924df684f 100644 --- a/alfa-client/libs/postfach-shared/src/lib/postfach.repository.spec.ts +++ b/alfa-client/libs/postfach-shared/src/lib/postfach.repository.spec.ts @@ -90,19 +90,19 @@ describe('PostfachRepository', () => { }); }); - describe('setHasNewPostfachNachrichten', () => { + describe('markPostfachAsUnread', () => { const postfachMailListResource: PostfachMailListResource = createPostfachMailListResource([ PostfachMailListLinkRel.SET_HAS_NEW_POSTFACH_NACHRICHT, ]); it('should call resourceFactory with resource', () => { - repository.setHasNewPostfachNachrichten(postfachMailListResource); + repository.markPostfachAsUnread(postfachMailListResource); expect(resourceFactory.from).toHaveBeenCalledWith(postfachMailListResource); }); it('should call resourceWrapper with link', () => { - repository.setHasNewPostfachNachrichten(postfachMailListResource); + repository.markPostfachAsUnread(postfachMailListResource); expect(resourceWrapper.put).toHaveBeenCalledWith(PostfachMailListLinkRel.SET_HAS_NEW_POSTFACH_NACHRICHT, { hasNewPostfachNachricht: true, diff --git a/alfa-client/libs/postfach-shared/src/lib/postfach.repository.ts b/alfa-client/libs/postfach-shared/src/lib/postfach.repository.ts index 76696a94d78a5c640114e98f045018f022e831ca..8a8b03f3d3e046197489b035ef6071b8026178cd 100644 --- a/alfa-client/libs/postfach-shared/src/lib/postfach.repository.ts +++ b/alfa-client/libs/postfach-shared/src/lib/postfach.repository.ts @@ -42,7 +42,7 @@ export class PostfachRepository { }); } - public setHasNewPostfachNachrichten(postfachNachrichtenList: PostfachMailListResource): Observable<unknown> { + public markPostfachAsUnread(postfachNachrichtenList: PostfachMailListResource): Observable<unknown> { return this.resourceFactory.from(postfachNachrichtenList).put(PostfachMailListLinkRel.SET_HAS_NEW_POSTFACH_NACHRICHT, { hasNewPostfachNachricht: true, }); diff --git a/alfa-client/libs/postfach-shared/src/lib/postfach.service.spec.ts b/alfa-client/libs/postfach-shared/src/lib/postfach.service.spec.ts index 08fe1caa948dd2a6c4f4c200d45d2b331bdd87af..f56688a6e9631052cc6ae12b4b1a173e8e1eda30 100644 --- a/alfa-client/libs/postfach-shared/src/lib/postfach.service.spec.ts +++ b/alfa-client/libs/postfach-shared/src/lib/postfach.service.spec.ts @@ -463,13 +463,13 @@ describe('PostfachService', () => { describe('setPostfachNachrichtListAsUnread', () => { beforeEach(() => { service._navigateToCurrentVorgang = jest.fn(); - repository.setHasNewPostfachNachrichten = jest.fn().mockReturnValue(of(null)); + repository.markPostfachAsUnread = jest.fn().mockReturnValue(of(null)); }); - it('should set hasNewPostfachNachrichten', () => { + it('should mark postfach as unread', () => { service.setPostfachNachrichtListAsUnread(); - expect(repository.setHasNewPostfachNachrichten).toHaveBeenCalled(); + expect(repository.markPostfachAsUnread).toHaveBeenCalled(); }); it('should navigate to vorgang', () => { diff --git a/alfa-client/libs/postfach-shared/src/lib/postfach.service.ts b/alfa-client/libs/postfach-shared/src/lib/postfach.service.ts index 64c238ddfa7e4609433ef21659d44ef364f3f166..3abb5760ccdbb06cbd42c744e27f5b63f396d763 100644 --- a/alfa-client/libs/postfach-shared/src/lib/postfach.service.ts +++ b/alfa-client/libs/postfach-shared/src/lib/postfach.service.ts @@ -291,7 +291,7 @@ export class PostfachService { public setPostfachNachrichtListAsUnread() { this.repository - .setHasNewPostfachNachrichten(this.postfachMailList$.value.resource) + .markPostfachAsUnread(this.postfachMailList$.value.resource) .pipe(take(1)) .subscribe(() => { this._navigateToCurrentVorgang();