Commit 298300e8 authored by JC Brand's avatar JC Brand

Add test for muc_respect_autojoin

parent b81fa43a
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
notify_all_room_messages: [ notify_all_room_messages: [
'discuss@conference.conversejs.org' 'discuss@conference.conversejs.org'
], ],
muc_respect_autojoin: false,
// bosh_service_url: 'http://chat.example.org:5280/http-bind/', // bosh_service_url: 'http://chat.example.org:5280/http-bind/',
bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes bosh_service_url: 'https://conversejs.org/http-bind/', // Please use this connection manager only for testing purposes
message_archiving: 'always', message_archiving: 'always',
......
...@@ -154,6 +154,7 @@ ...@@ -154,6 +154,7 @@
[{'category': 'pubsub', 'type': 'pep'}], [{'category': 'pubsub', 'type': 'pep'}],
['http://jabber.org/protocol/pubsub#publish-options'] ['http://jabber.org/protocol/pubsub#publish-options']
); );
await test_utils.waitUntil(() => _converse.bookmarks);
let jid = 'lounge@localhost'; let jid = 'lounge@localhost';
_converse.bookmarks.create({ _converse.bookmarks.create({
'jid': jid, 'jid': jid,
...@@ -171,6 +172,17 @@ ...@@ -171,6 +172,17 @@
'nick': ' Othello' 'nick': ' Othello'
}); });
expect(_.isUndefined(_converse.chatboxviews.get(jid))).toBeFalsy(); expect(_.isUndefined(_converse.chatboxviews.get(jid))).toBeFalsy();
// Check that we don't auto-join if muc_respect_autojoin is false
_converse.muc_respect_autojoin = false;
jid = 'balcony@conference.shakespeare.lit';
_converse.bookmarks.create({
'jid': jid,
'autojoin': true,
'name': 'Balcony',
'nick': ' Othello'
});
expect(_.isUndefined(_converse.chatboxviews.get(jid))).toBe(true);
done(); 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