summaryrefslogtreecommitdiff
path: root/web-ui/test
diff options
context:
space:
mode:
authorGiovane <giovaneliberato@gmail.com>2015-12-01 23:04:34 -0200
committerGiovane <giovaneliberato@gmail.com>2015-12-29 15:13:53 -0200
commit14f0e57ccbda82206cd8149018b306c6f17032d9 (patch)
tree345770216b5e5991a5a573a809e8d7cc2f31653b /web-ui/test
parent8614202031525b87a55b16517a12f61c05b8b33a (diff)
Shows unread count on title bar
- This commit creates the unread_count_title component
Diffstat (limited to 'web-ui/test')
-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>');
+ });
+
+ });
+});