Browse Source

Bugfix in tests, make sure message counter is cleared

JC Brand 12 năm trước cách đây
mục cha
commit
dc6c78331f
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      spec/MainSpec.js

+ 4 - 0
spec/MainSpec.js

@@ -553,6 +553,10 @@
         }, converse));
 
         describe("A Message Counter", $.proxy(function () {
+            beforeEach($.proxy(function () {
+                converse.clearMsgCounter();
+            }, converse));
+
             it("is incremented when the message is received and the window is not focused", $.proxy(function () {
                 expect(this.msg_counter).toBe(0);
                 spyOn(converse, 'incrementMsgCounter').andCallThrough();