|
@@ -11,6 +11,7 @@
|
|
} (this, function ($, mock, test_utils, utils) {
|
|
} (this, function ($, mock, test_utils, utils) {
|
|
var $pres = converse_api.env.$pres;
|
|
var $pres = converse_api.env.$pres;
|
|
var $msg = converse_api.env.$msg;
|
|
var $msg = converse_api.env.$msg;
|
|
|
|
+ var Strophe = converse_api.env.Strophe;
|
|
|
|
|
|
return describe("ChatRooms", $.proxy(function (mock, test_utils) {
|
|
return describe("ChatRooms", $.proxy(function (mock, test_utils) {
|
|
describe("A Chat Room", $.proxy(function () {
|
|
describe("A Chat Room", $.proxy(function () {
|
|
@@ -21,6 +22,13 @@
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ it("can have spaces and special characters in its name", function () {
|
|
|
|
+ test_utils.openChatRoom('lounge & leisure', 'localhost', 'dummy');
|
|
|
|
+ var view = converse.chatboxviews.get(
|
|
|
|
+ Strophe.escapeNode('lounge & leisure')+'@localhost');
|
|
|
|
+ expect(view instanceof converse.ChatRoomView).toBe(true);
|
|
|
|
+ });
|
|
|
|
+
|
|
it("shows users currently present in the room", $.proxy(function () {
|
|
it("shows users currently present in the room", $.proxy(function () {
|
|
test_utils.openChatRoom('lounge', 'localhost', 'dummy');
|
|
test_utils.openChatRoom('lounge', 'localhost', 'dummy');
|
|
var name;
|
|
var name;
|