Fix tests. removeRoom method doesn't exist anymore

This commit is contained in:
JC Brand 2013-08-20 22:03:46 +02:00
parent 2896ae2ce4
commit 2699c3ca70
2 changed files with 0 additions and 10 deletions

View File

@ -10,7 +10,6 @@
'listRooms': function () {}, 'listRooms': function () {},
'join': function () {}, 'join': function () {},
'leave': function () {}, 'leave': function () {},
'removeRoom': function () {},
'rooms': {} 'rooms': {}
}, },
'jid': 'dummy@localhost', 'jid': 'dummy@localhost',

View File

@ -143,7 +143,6 @@
waits(250); waits(250);
runs(function () { runs(function () {
var $chat_body = view.$el.find('.chat-body'); var $chat_body = view.$el.find('.chat-body');
expect(converse.connection.muc.removeRoom).toHaveBeenCalled();
expect(view.renderPasswordForm).toHaveBeenCalled(); expect(view.renderPasswordForm).toHaveBeenCalled();
expect($chat_body.find('form.chatroom-form').length).toBe(1); expect($chat_body.find('form.chatroom-form').length).toBe(1);
expect($chat_body.find('legend').text()).toBe('This chatroom requires a password'); expect($chat_body.find('legend').text()).toBe('This chatroom requires a password');
@ -163,7 +162,6 @@
spyOn(converse.connection.muc, 'removeRoom'); spyOn(converse.connection.muc, 'removeRoom');
spyOn(view, 'showErrorMessage').andCallThrough(); spyOn(view, 'showErrorMessage').andCallThrough();
view.onChatRoomPresence(presence, {'nick': 'dummy'}); view.onChatRoomPresence(presence, {'nick': 'dummy'});
expect(converse.connection.muc.removeRoom).toHaveBeenCalled();
expect(view.$el.find('.chat-body p').text()).toBe('You are not on the member list of this room'); expect(view.$el.find('.chat-body p').text()).toBe('You are not on the member list of this room');
}, converse)); }, converse));
@ -180,7 +178,6 @@
spyOn(converse.connection.muc, 'removeRoom'); spyOn(converse.connection.muc, 'removeRoom');
spyOn(view, 'showErrorMessage').andCallThrough(); spyOn(view, 'showErrorMessage').andCallThrough();
view.onChatRoomPresence(presence, {'nick': 'dummy'}); view.onChatRoomPresence(presence, {'nick': 'dummy'});
expect(converse.connection.muc.removeRoom).toHaveBeenCalled();
expect(view.$el.find('.chat-body p').text()).toBe('You have been banned from this room'); expect(view.$el.find('.chat-body p').text()).toBe('You have been banned from this room');
}, converse)); }, converse));
@ -197,7 +194,6 @@
spyOn(converse.connection.muc, 'removeRoom'); spyOn(converse.connection.muc, 'removeRoom');
spyOn(view, 'showErrorMessage').andCallThrough(); spyOn(view, 'showErrorMessage').andCallThrough();
view.onChatRoomPresence(presence, {'nick': 'dummy'}); view.onChatRoomPresence(presence, {'nick': 'dummy'});
expect(converse.connection.muc.removeRoom).toHaveBeenCalled();
expect(view.$el.find('.chat-body p').text()).toBe('No nickname was specified'); expect(view.$el.find('.chat-body p').text()).toBe('No nickname was specified');
}, converse)); }, converse));
@ -214,7 +210,6 @@
spyOn(converse.connection.muc, 'removeRoom'); spyOn(converse.connection.muc, 'removeRoom');
spyOn(view, 'showErrorMessage').andCallThrough(); spyOn(view, 'showErrorMessage').andCallThrough();
view.onChatRoomPresence(presence, {'nick': 'dummy'}); view.onChatRoomPresence(presence, {'nick': 'dummy'});
expect(converse.connection.muc.removeRoom).toHaveBeenCalled();
expect(view.$el.find('.chat-body p').text()).toBe('You are not allowed to create new rooms'); expect(view.$el.find('.chat-body p').text()).toBe('You are not allowed to create new rooms');
}, converse)); }, converse));
@ -231,7 +226,6 @@
spyOn(converse.connection.muc, 'removeRoom'); spyOn(converse.connection.muc, 'removeRoom');
spyOn(view, 'showErrorMessage').andCallThrough(); spyOn(view, 'showErrorMessage').andCallThrough();
view.onChatRoomPresence(presence, {'nick': 'dummy'}); view.onChatRoomPresence(presence, {'nick': 'dummy'});
expect(converse.connection.muc.removeRoom).toHaveBeenCalled();
expect(view.$el.find('.chat-body p').text()).toBe("Your nickname doesn't conform to this room's policies"); expect(view.$el.find('.chat-body p').text()).toBe("Your nickname doesn't conform to this room's policies");
}, converse)); }, converse));
@ -248,7 +242,6 @@
spyOn(converse.connection.muc, 'removeRoom'); spyOn(converse.connection.muc, 'removeRoom');
spyOn(view, 'showErrorMessage').andCallThrough(); spyOn(view, 'showErrorMessage').andCallThrough();
view.onChatRoomPresence(presence, {'nick': 'dummy'}); view.onChatRoomPresence(presence, {'nick': 'dummy'});
expect(converse.connection.muc.removeRoom).toHaveBeenCalled();
expect(view.$el.find('.chat-body p').text()).toBe("Your nickname is already taken"); expect(view.$el.find('.chat-body p').text()).toBe("Your nickname is already taken");
}, converse)); }, converse));
@ -265,7 +258,6 @@
spyOn(converse.connection.muc, 'removeRoom'); spyOn(converse.connection.muc, 'removeRoom');
spyOn(view, 'showErrorMessage').andCallThrough(); spyOn(view, 'showErrorMessage').andCallThrough();
view.onChatRoomPresence(presence, {'nick': 'dummy'}); view.onChatRoomPresence(presence, {'nick': 'dummy'});
expect(converse.connection.muc.removeRoom).toHaveBeenCalled();
expect(view.$el.find('.chat-body p').text()).toBe("This room does not (yet) exist"); expect(view.$el.find('.chat-body p').text()).toBe("This room does not (yet) exist");
}, converse)); }, converse));
@ -282,7 +274,6 @@
spyOn(converse.connection.muc, 'removeRoom'); spyOn(converse.connection.muc, 'removeRoom');
spyOn(view, 'showErrorMessage').andCallThrough(); spyOn(view, 'showErrorMessage').andCallThrough();
view.onChatRoomPresence(presence, {'nick': 'dummy'}); view.onChatRoomPresence(presence, {'nick': 'dummy'});
expect(converse.connection.muc.removeRoom).toHaveBeenCalled();
expect(view.$el.find('.chat-body p').text()).toBe("This room has reached it's maximum number of occupants"); expect(view.$el.find('.chat-body p').text()).toBe("This room has reached it's maximum number of occupants");
}, converse)); }, converse));
}, converse)); }, converse));