From fffc0213c4a228af91f2ab007da1acdcda8f613d Mon Sep 17 00:00:00 2001 From: Derek Wang Date: Mon, 19 May 2014 22:12:55 +0800 Subject: [PATCH] Fix format --- spec/chatbox.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/spec/chatbox.js b/spec/chatbox.js index 345e98b69..1813778b7 100644 --- a/spec/chatbox.js +++ b/spec/chatbox.js @@ -584,26 +584,28 @@ expect(msg.text()).toEqual(message); expect(msg.html()).toEqual('This message contains a hyperlink: www.opkode.com'); }, converse)); - + it("should display emoticons correctly", $.proxy(function () { var contact_jid = mock.cur_names[0].replace(' ','.').toLowerCase() + '@localhost'; utils.openChatBoxFor(contact_jid); var view = this.chatboxviews.get(contact_jid); var messages = [':)', ';)', ':D', ':P', '8)', '>:)', ':S', ':\\', '>:(', ':(', ':O', '(^.^)b', '<3']; - var emoticons = ['', '', - '', '', - '', '', - '', '', - '', '', - '', '', - '']; + var emoticons = [ + '', '', + '', '', + '', '', + '', '', + '', '', + '', '', + '' + ]; spyOn(view, 'sendMessage').andCallThrough(); for (var i = 0; i < messages.length; i++) { - var message = messages[i]; - utils.sendMessage(view, message); - expect(view.sendMessage).toHaveBeenCalled(); - var msg = view.$el.find('.chat-content').find('.chat-message').last().find('.chat-message-content'); - expect(msg.html()).toEqual(emoticons[i]); + var message = messages[i]; + utils.sendMessage(view, message); + expect(view.sendMessage).toHaveBeenCalled(); + var msg = view.$el.find('.chat-content').find('.chat-message').last().find('.chat-message-content'); + expect(msg.html()).toEqual(emoticons[i]); } }, converse));