From c9d7e17a104d5606383a827a04b88c82c1e4357f Mon Sep 17 00:00:00 2001 From: JC Brand Date: Sat, 14 Jun 2014 22:03:04 +0200 Subject: [PATCH] Fix test failures due to previous commit --- converse.js | 2 +- spec/converse.js | 4 ++-- tests/main.js | 2 +- tests/mock.js | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/converse.js b/converse.js index 376d86520..de6133955 100644 --- a/converse.js +++ b/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 () { diff --git a/spec/converse.js b/spec/converse.js index 56dbc013c..99c6d775a 100644 --- a/spec/converse.js +++ b/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); diff --git a/tests/main.js b/tests/main.js index b9eb7bc8d..8287f90a3 100644 --- a/tests/main.js +++ b/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(); diff --git a/tests/mock.js b/tests/mock.js index b81a38bd8..23885ce59 100644 --- a/tests/mock.js +++ b/tests/mock.js @@ -29,6 +29,7 @@ }; mock.mock_connection = { + '_proto': {}, 'mock': true, 'muc': { 'listRooms': function () {},