mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
Rename all function on MessageList to all_messages.
This commit is contained in:
@@ -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(), []);
|
||||
|
||||
}());
|
||||
|
||||
|
||||
@@ -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];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user