topic lists: Add get_stream_name() to topic list widget.

This commit is contained in:
Steve Howell
2016-11-10 11:19:22 -08:00
committed by Tim Abbott
parent d8b5558699
commit f923320de8
2 changed files with 5 additions and 0 deletions

View File

@@ -35,6 +35,7 @@ global.compile_template('topic_list_item');
var topic_html = widget.get_dom();
assert.equal(widget.get_parent(), parent_elem);
assert.equal(widget.get_stream_name(), 'devel');
var topic = $(topic_html).find('a').text().trim();
assert.equal(topic, 'coding');

View File

@@ -94,6 +94,10 @@ exports.build_widget = function (parent_elem, stream, active_topic, max_topics)
return stream === stream_name;
};
self.get_stream_name = function () {
return stream;
};
self.get_dom = function () {
return self.dom;
};