Explorar o código

Bugfix in tests, make sure message counter is cleared

JC Brand %!s(int64=12) %!d(string=hai) anos
pai
achega
dc6c78331f
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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();