blob: ce49c48bd8bc7e1399ca7386248577362c02ffb3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
describeComponent('page/unread_count_title', function () {
'use strict';
describe('title bar', function () {
beforeEach(function () {
this.setupComponent('<span></span>');
});
it('should render template', function () {
expect(this.$node).toExist();
expect(this.$node.html()).toEqual('<span>(1)</span>');
});
it('should update count on mail read event', function () {
this.component.trigger(Pixelated.events.mails.read);
$(document).trigger(Pixelated.events.mail.read, { tags: ['someothertag'], mailbox: 'inbox' });
expect(this.$node.html()).toEqual('<span>(1)</span>');
});
});
});
|