Commit a36e8a63 authored by JC Brand's avatar JC Brand

Fix test when not running on localhost

parent 6e67bdfd
...@@ -1250,7 +1250,7 @@ ...@@ -1250,7 +1250,7 @@
expect(view.sendMessage).toHaveBeenCalled(); expect(view.sendMessage).toHaveBeenCalled();
var msg = view.$el.find('.chat-content').find('.chat-message').last().find('.chat-msg-content'); var msg = view.$el.find('.chat-content').find('.chat-message').last().find('.chat-msg-content');
expect(msg.html()).toEqual( expect(msg.html()).toEqual(
'<a target="_blank" rel="noopener" href="http://localhost:8000/logo/conversejs.svg"><img src="' + '<a target="_blank" rel="noopener" href="'+base_url+'/logo/conversejs.svg"><img src="' +
message + '" class="chat-image"></a>'); message + '" class="chat-image"></a>');
message += "?param1=val1&param2=val2"; message += "?param1=val1&param2=val2";
test_utils.sendMessage(view, message); test_utils.sendMessage(view, message);
...@@ -1261,7 +1261,7 @@ ...@@ -1261,7 +1261,7 @@
expect(view.sendMessage).toHaveBeenCalled(); expect(view.sendMessage).toHaveBeenCalled();
var msg = view.$el.find('.chat-content').find('.chat-message').last().find('.chat-msg-content'); var msg = view.$el.find('.chat-content').find('.chat-message').last().find('.chat-msg-content');
expect(msg.html()).toEqual( expect(msg.html()).toEqual(
'<a target="_blank" rel="noopener" href="http://localhost:8000/logo/conversejs.svg?param1=val1&amp;param2=val2"><img src="'+ '<a target="_blank" rel="noopener" href="'+base_url+'/logo/conversejs.svg?param1=val1&amp;param2=val2"><img src="'+
message.replace(/&/g, '&amp;') + message.replace(/&/g, '&amp;') +
'" class="chat-image"></a>') '" class="chat-image"></a>')
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