Commit 7c782ed6 authored by JC Brand's avatar JC Brand

Fix failing test

parent aa7483a8
......@@ -1671,11 +1671,12 @@
var sent_IQ, IQ_id;
var sendIQ = _converse.connection.sendIQ;
test_utils.openAndEnterChatRoom(_converse, 'coven', 'chat.shakespeare.lit', 'some1').then(function () {
spyOn(_converse.connection, 'sendIQ').and.callFake(function (iq, callback, errback) {
sent_IQ = iq;
IQ_id = sendIQ.bind(this)(iq, callback, errback);
});
_converse.api.rooms.open('coven@chat.shakespeare.lit', {'nick': 'some1'});
// We pretend this is a new room, so no disco info is returned.
var features_stanza = $iq({
......@@ -1708,9 +1709,10 @@
_converse.connection._dataRecv(test_utils.createRequest(message));
var $chat_body = view.$('.chatroom-body');
expect($chat_body.html().trim().indexOf(
'<div class="chat-info">This room is now no longer anonymous</div>'
'<div class="message chat-info">This room is now no longer anonymous</div>'
)).not.toBe(-1);
done();
});
}));
it("informs users if they have been kicked out of the chat room",
......
......@@ -120,9 +120,9 @@
// We pretend this is a new room, so no disco info is returned.
var IQ_id = converse.connection.sendIQ.firstCall.returnValue;
var features_stanza = $iq({
'from': 'lounge@localhost',
'from': room+'@'+server,
'id': IQ_id,
'to': 'dummy@localhost/desktop',
'to': nick+'@'+server+'/desktop',
'type': 'error'
}).c('error', {'type': 'cancel'})
.c('item-not-found', {'xmlns': "urn:ietf:params:xml:ns:xmpp-stanzas"});
......
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