mirror of
https://github.com/zulip/zulip.git
synced 2026-06-21 21:32:29 +08:00
zblueslip: Remove redundant get_test_logs calls.
This commit is contained in:
parent
7c357b27d8
commit
9fd645f9ee
@ -254,6 +254,7 @@ run_test('retry', () => {
|
||||
f();
|
||||
});
|
||||
|
||||
blueslip.expect('log', 'Retrying idempotent[object Object]');
|
||||
test_with_mock_ajax({
|
||||
run_code: function () {
|
||||
options.simulate_success();
|
||||
@ -263,8 +264,6 @@ run_test('retry', () => {
|
||||
assert.equal(options.data, 42);
|
||||
},
|
||||
});
|
||||
|
||||
assert.equal(blueslip.get_test_logs('log')[0].message, 'Retrying idempotent[object Object]');
|
||||
blueslip.reset();
|
||||
},
|
||||
});
|
||||
|
||||
@ -22,9 +22,9 @@ run_test('report_late_add', () => {
|
||||
people.report_late_add(55, 'foo@example.com');
|
||||
blueslip.reset();
|
||||
|
||||
blueslip.expect('log', 'Added user late: user_id=55 email=foo@example.com');
|
||||
reload_state.is_in_progress = return_true;
|
||||
people.report_late_add(55, 'foo@example.com');
|
||||
assert.equal(blueslip.get_test_logs('log')[0].message, 'Added user late: user_id=55 email=foo@example.com');
|
||||
blueslip.reset();
|
||||
});
|
||||
|
||||
@ -36,7 +36,7 @@ run_test('is_my_user_id', () => {
|
||||
blueslip.expect('error', 'user_id is a string in my_user_id: 30');
|
||||
assert.equal(people.is_my_user_id(me.user_id.toString()), true);
|
||||
|
||||
assert.equal(blueslip.get_test_logs('error').length, 2);
|
||||
blueslip.reset();
|
||||
});
|
||||
|
||||
run_test('blueslip', () => {
|
||||
|
||||
@ -136,7 +136,6 @@ run_test('basics', () => {
|
||||
blueslip.expect('warn', 'Unknown user_id 8888 in reaction for message 1001');
|
||||
blueslip.expect('warn', 'Unknown user_id 9999 in reaction for message 1001');
|
||||
const result = reactions.get_message_reactions(message);
|
||||
assert.equal(blueslip.get_test_logs('warn').length, 2);
|
||||
blueslip.reset();
|
||||
assert(reactions.current_user_has_reacted_to_emoji(message, 'unicode_emoji,263a'));
|
||||
assert(!reactions.current_user_has_reacted_to_emoji(message, 'bogus'));
|
||||
|
||||
@ -260,7 +260,6 @@ run_test('subscribers', () => {
|
||||
blueslip.expect('warn', 'We got a remove_subscriber call for a non-existent stream ' + bad_stream);
|
||||
ok = stream_data.remove_subscriber(bad_stream, brutus.user_id);
|
||||
assert(!ok);
|
||||
assert.equal(blueslip.get_test_logs('warn').length, 2);
|
||||
|
||||
// verify that removing an already-removed subscriber is a noop
|
||||
blueslip.expect('warn', 'We tried to remove invalid subscriber: 104');
|
||||
@ -311,7 +310,6 @@ run_test('subscribers', () => {
|
||||
blueslip.expect('error', 'We tried to add invalid subscriber: 9999999');
|
||||
ok = stream_data.add_subscriber('Rome', 9999999);
|
||||
assert(!ok);
|
||||
assert.equal(blueslip.get_test_logs('error').length, 2);
|
||||
blueslip.reset();
|
||||
});
|
||||
|
||||
|
||||
@ -151,7 +151,6 @@ run_test('updates', () => {
|
||||
blueslip.expect('error', 'Got update_person event for unexpected user 29');
|
||||
blueslip.expect('error', 'Unknown user_id in get_by_user_id: 29');
|
||||
assert(!user_events.update_person({user_id: 29, full_name: 'Sir Isaac Newton'}));
|
||||
assert.equal(blueslip.get_test_logs('error').length, 2);
|
||||
blueslip.reset();
|
||||
|
||||
me.profile_data = {};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user