Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
Removed flaky unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
rpaschoal committed Jul 8, 2018
1 parent 815bc7f commit 3b47448
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions src/spec/ng-chat.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1098,31 +1098,3 @@ it('Must not focus on the new window when it is collapsed', () =>{
expect(result).not.toBeUndefined();
expect(this.subject.focusOnWindow).not.toHaveBeenCalled();
});

it('unreadMessagesTotalByUser must invoke unreadMessagesTotal if there is a window opened for a supplied user argument', () => {
let user: User = {
id: 999,
displayName: 'Test user',
status: 1,
avatar: ''
};
let window = new Window();

window.chattingTo = user;

this.subject.windows.push(window);

spyOn(this.subject, 'unreadMessagesTotal');

this.subject.unreadMessagesTotalByUser(user);

expect(this.subject.unreadMessagesTotal).toHaveBeenCalledTimes(1);
});

it('unreadMessagesTotalByUser must not invoke unreadMessagesTotal if there is no open window for a supplied user argument', () => {
spyOn(this.subject, 'unreadMessagesTotal');

this.subject.unreadMessagesTotalByUser(new User());

expect(this.subject.unreadMessagesTotal).not.toHaveBeenCalled();
});

0 comments on commit 3b47448

Please sign in to comment.