Skip to content

Commit

Permalink
#25748 Added a test for showUnreadAnnouncement
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelrojas committed Feb 16, 2024
1 parent cf7c57a commit e988f38
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,13 @@ describe('DotToolbarAnnouncementsComponent', () => {
const announcementLink = spectator.query(byTestId('announcement_link'));
expect(announcementLink.getAttribute('target')).toBe('_blank');
});

it('should call markAnnouncementsAsRead when showUnreadAnnouncement is false', () => {
const markAnnouncementsAsReadSpy = spyOn(
spectator.component.announcementsStore,
'markAnnouncementsAsRead'
);
spectator.setInput('showUnreadAnnouncement', false);
expect(markAnnouncementsAsReadSpy).toHaveBeenCalled();
});
});

0 comments on commit e988f38

Please sign in to comment.