From fe17be24e00b51837d8a08535632143883bb4028 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Wed, 28 Oct 2020 14:50:51 +0100 Subject: [PATCH] spec/smacks: prevent two MUCs from being created --- spec/smacks.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/smacks.js b/spec/smacks.js index 5e761be1d..0981ea5ca 100644 --- a/spec/smacks.js +++ b/spec/smacks.js @@ -231,9 +231,8 @@ describe("XEP-0198 Stream Management", function () { }) ); - _converse.no_connection_on_bind = true; // XXX Don't trigger CONNECTED in tests/mock.js + _converse.no_connection_on_bind = true; // XXX Don't trigger CONNECTED in MockConnection await _converse.api.user.login('romeo@montague.lit', 'secret'); - delete _converse.no_connection_on_bind; const sent_stanzas = _converse.connection.sent_stanzas; const stanza = await u.waitUntil(() => sent_stanzas.filter(s => (s.tagName === 'resume')).pop()); @@ -243,7 +242,6 @@ describe("XEP-0198 Stream Management", function () { _converse.connection._dataRecv(mock.createRequest(result)); expect(_converse.session.get('smacks_enabled')).toBe(true); - const nick = 'romeo'; const func = _converse.chatboxes.onChatBoxesFetched; spyOn(_converse.chatboxes, 'onChatBoxesFetched').and.callFake(collection => { @@ -274,6 +272,8 @@ describe("XEP-0198 Stream Management", function () { await u.waitUntil(() => muc.messages.length); expect(muc.messages.at(0).get('message')).toBe('First message') + + delete _converse.no_connection_on_bind; done(); })); });