stream_data: Remove stream_name param from add_sub().

We just get the stream_name from the sub struct now.

This mostly affects node tests.

The only place in real code where we called add_sub()
was when we initialized data from the server.
This commit is contained in:
Steve Howell
2020-02-09 21:02:55 +00:00
committed by Tim Abbott
parent 3af8dc6c7d
commit fa1059aa2e
25 changed files with 94 additions and 93 deletions

View File

@@ -67,7 +67,7 @@ zrequire('settings_display');
run_test('stream_data', () => {
assert.equal(stream_data.get_sub_by_name('Denmark'), undefined);
stream_data.add_sub('Denmark', denmark_stream);
stream_data.add_sub(denmark_stream);
const sub = stream_data.get_sub_by_name('Denmark');
assert.equal(sub.color, 'blue');
});
@@ -596,7 +596,7 @@ const social_stream = {
};
run_test('set_up_filter', () => {
stream_data.add_sub('Social', social_stream);
stream_data.add_sub(social_stream);
const filter_terms = [
{operator: 'stream', operand: 'Social'},