diff --git a/spec/MainSpec.js b/spec/MainSpec.js index c34582ba1..b3681bdb6 100644 --- a/spec/MainSpec.js +++ b/spec/MainSpec.js @@ -412,17 +412,17 @@ it("can be saved to, and retrieved from, localStorage", $.proxy(function () { // We instantiate a new ChatBoxes collection, which by default // will be empty. - this.newchatboxes = new this.ChatBoxes(); - expect(this.newchatboxes.length).toEqual(0); + var newchatboxes = new this.ChatBoxes(); + expect(newchatboxes.length).toEqual(0); // The chatboxes will then be fetched from localStorage inside the // onConnected method - this.newchatboxes.onConnected(); - expect(this.newchatboxes.length).toEqual(6); + newchatboxes.onConnected(); + expect(newchatboxes.length).toEqual(6); // Check that the roster items retrieved from localStorage // have the same attributes values as the original ones. attrs = ['id', 'box_id', 'visible']; for (i=0; i