Rename all function on MessageList to all_messages.

This commit is contained in:
Vishnu Ks
2016-04-23 04:26:44 +05:30
committed by Tim Abbott
parent cbba7202e6
commit ae49ad383d
7 changed files with 19 additions and 22 deletions

View File

@@ -61,7 +61,7 @@ var MessageList = require('js/message_list').MessageList;
assert.equal(list.closest_id(60), 60);
assert.equal(list.closest_id(61), 60);
assert.deepEqual(list.all(), messages);
assert.deepEqual(list.all_messages(), messages);
global.$.Event = function (ev) {
assert.equal(ev, 'message_selected.zulip');
@@ -96,13 +96,13 @@ var MessageList = require('js/message_list').MessageList;
list.view.clear_table = function () {};
list.remove_and_rerender([{id: 60}]);
var removed = list.all().filter(function (msg) {
var removed = list.all_messages().filter(function (msg) {
return msg.id !== 60;
});
assert.deepEqual(list.all(), removed);
assert.deepEqual(list.all_messages(), removed);
list.clear();
assert.deepEqual(list.all(), []);
assert.deepEqual(list.all_messages(), []);
}());

View File

@@ -46,7 +46,7 @@ var zero_counts = {
narrow.active = function () {
return true;
};
current_msg_list.all = function () {
current_msg_list.all_messages = function () {
return [];
};
@@ -58,7 +58,7 @@ var zero_counts = {
narrow.active = function () {
return false;
};
current_msg_list.all = function () {
current_msg_list.all_messages = function () {
return [];
};
@@ -363,7 +363,7 @@ var zero_counts = {
var message = {
id: 15
};
current_msg_list.all = function () {
current_msg_list.all_messages = function () {
return [message];
};