node tests: Cover exports.get_default_status.

This commit is contained in:
Jerry Zhang 2017-12-03 11:40:01 -08:00 committed by showell
parent e134fd610e
commit 48ebec3a29
1 changed files with 5 additions and 0 deletions

View File

@ -72,6 +72,11 @@ zrequire('stream_data');
assert.equal(stream_data.maybe_get_stream_name(), undefined);
assert.equal(stream_data.maybe_get_stream_name(social.stream_id), 'social');
assert.equal(stream_data.maybe_get_stream_name(42), undefined);
stream_data.set_realm_default_streams([denmark]);
assert(stream_data.get_default_status('Denmark'));
assert(!stream_data.get_default_status('social'));
assert(!stream_data.get_default_status('UNKNOWN'));
}());
(function test_renames() {