tests: Test private msg validation with zephyr mirror.

This commit is contained in:
Joshua Pan
2018-07-22 23:19:48 -07:00
committed by showell
parent f5ee360c57
commit 8de454ad2d

View File

@@ -213,7 +213,9 @@ run_test('validate', () => {
initialize_pm_pill();
add_content_to_compose_box();
// test validating private messages
compose_state.set_message_type('private');
compose_state.recipient('');
assert(!compose.validate());
assert.equal($('#compose-error-msg').html(), i18n.t('Please specify at least one valid recipient'));
@@ -235,6 +237,10 @@ run_test('validate', () => {
compose_state.recipient('bob@example.com');
assert(compose.validate());
page_params.realm_is_zephyr_mirror_realm = true;
assert(compose.validate());
page_params.realm_is_zephyr_mirror_realm = false;
compose_state.set_message_type('stream');
compose_state.stream_name('');
$("#stream").select(noop);