mirror of https://github.com/zulip/zulip.git
tests: Improve templates.compose_private_stream_alert() test.
I assert that the stream_name gets properly placed into the HTML.
This commit is contained in:
parent
8f190e0746
commit
e74118e730
|
@ -520,10 +520,15 @@ function render(template_name, args) {
|
||||||
|
|
||||||
(function compose_private_stream_alert() {
|
(function compose_private_stream_alert() {
|
||||||
var args = {
|
var args = {
|
||||||
name: 'Demark',
|
stream_name: 'Denmark',
|
||||||
invite_only: true,
|
invite_only: true,
|
||||||
};
|
};
|
||||||
var html = render('compose_private_stream_alert', args);
|
var html = render('compose_private_stream_alert', args);
|
||||||
|
assert($(html).hasClass('compose_private_stream_alert'));
|
||||||
|
|
||||||
|
var actual_text = $(html).text();
|
||||||
|
var expected_text = 'translated: Warning: Denmark is a private stream.';
|
||||||
|
assert(actual_text.indexOf(expected_text) >= 1);
|
||||||
global.write_handlebars_output("compose_stream_alert", html);
|
global.write_handlebars_output("compose_stream_alert", html);
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue