Commit fe17be24 authored by JC Brand's avatar JC Brand

spec/smacks: prevent two MUCs from being created

parent c08ee00f
......@@ -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();
}));
});
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment