Sfoglia il codice sorgente

Fix test failures due to previous commit

JC Brand 11 anni fa
parent
commit
c9d7e17a10
4 ha cambiato i file con 5 aggiunte e 4 eliminazioni
  1. 1 1
      converse.js
  2. 2 2
      spec/converse.js
  3. 1 1
      tests/main.js
  4. 1 0
      tests/mock.js

+ 1 - 1
converse.js

@@ -2706,7 +2706,7 @@
                 var id = b64_sha1('converse.minchatstoggle'+this.bare_jid);
                 this.toggleview.model.id = id; // Appears to be necessary for backbone.localStorage
                 this.toggleview.model.localStorage = new Backbone.LocalStorage(id);
-                this.toggleview.model.fetch({success: callback, error: callback});
+                this.toggleview.model.fetch();
             },
 
             render: function () {

+ 2 - 2
spec/converse.js

@@ -16,7 +16,7 @@
 
         it("has an API method for retrieving the next RID", $.proxy(function () {
             var old_connection = converse.connection;
-            converse.connection.rid = '1234';
+            converse.connection._proto.rid = '1234';
             converse.expose_rid_and_sid = false;
             expect(converse_api.getRID()).toBe(null);
 
@@ -31,7 +31,7 @@
 
         it("has an API method for retrieving the SID", $.proxy(function () {
             var old_connection = converse.connection;
-            converse.connection.sid = '1234';
+            converse.connection._proto.sid = '1234';
             converse.expose_rid_and_sid = false;
             expect(converse_api.getSID()).toBe(null);
 

+ 1 - 1
tests/main.js

@@ -69,7 +69,7 @@ require([
                 delete converse.callback;
                 // Stub the trimChat method. It causes havoc when running with
                 // phantomJS.
-                converse.ChatBoxView.prototype.trimChat = function () {};
+                converse.ChatBoxViews.prototype.trimChat = function () {};
 
                 // Jasmine stuff
                 var jasmineEnv = jasmine.getEnv();

+ 1 - 0
tests/mock.js

@@ -29,6 +29,7 @@
     };
 
     mock.mock_connection = {
+        '_proto': {},
         'mock': true,
         'muc': {
             'listRooms': function () {},