From 22ca18f59cf1a1b6e62f44f514141e48e3e46c8a Mon Sep 17 00:00:00 2001 From: Rohitt Vashishtha Date: Tue, 1 May 2018 09:31:10 +0530 Subject: [PATCH] zblueslip: Convert node_tests/pm_list.js to zblueslip. --- frontend_tests/node_tests/pm_list.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend_tests/node_tests/pm_list.js b/frontend_tests/node_tests/pm_list.js index 718ce8b1c2..0a546c02c7 100644 --- a/frontend_tests/node_tests/pm_list.js +++ b/frontend_tests/node_tests/pm_list.js @@ -9,7 +9,7 @@ set_global('stream_popover', { }); set_global('unread', {}); set_global('unread_ui', {}); -set_global('blueslip', {}); +set_global('blueslip', global.make_zblueslip()); set_global('popovers', { hide_all: function () {}, }); @@ -45,12 +45,11 @@ global.people.initialize_current_user(me.user_id); (function test_get_conversation_li() { var test_conversation = 'foo@example.com,bar@example.com'; - var error_msg; - global.blueslip.warn = function (error) { - error_msg = error; - }; + blueslip.set_test_data('warn', 'Unknown conversation: ' + test_conversation); + blueslip.set_test_data('warn', 'Unknown emails: ' + test_conversation); // people.js pm_list.get_conversation_li(test_conversation); - assert.equal(error_msg, 'Unknown conversation: ' + test_conversation); + assert.equal(blueslip.get_test_logs('warn').length, 2); + blueslip.clear_test_data(); }()); (function test_close() {