summaryrefslogtreecommitdiff
path: root/web-ui/test/spec/page/unread_count_title.spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/test/spec/page/unread_count_title.spec.js')
-rw-r--r--web-ui/test/spec/page/unread_count_title.spec.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/web-ui/test/spec/page/unread_count_title.spec.js b/web-ui/test/spec/page/unread_count_title.spec.js
new file mode 100644
index 00000000..ce49c48b
--- /dev/null
+++ b/web-ui/test/spec/page/unread_count_title.spec.js
@@ -0,0 +1,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>');
+ });
+
+ });
+});