FEATURE: Allow posting a link with topics

This commit is contained in:
Erick Guan
2016-12-05 13:31:43 +01:00
parent e82084405e
commit 52763f5115
50 changed files with 503 additions and 77 deletions

View File

@ -40,6 +40,10 @@ test('missingReplyCharacters', function() {
missingReplyCharacters('hi', false, false, Discourse.SiteSettings.min_post_length - 2, 'too short public post');
missingReplyCharacters('hi', false, true, Discourse.SiteSettings.min_first_post_length - 2, 'too short first post');
missingReplyCharacters('hi', true, false, Discourse.SiteSettings.min_private_message_post_length - 2, 'too short private message');
Discourse.SiteSettings.topic_featured_link_onebox = true;
const composer = createComposer({ canEditTopicFeaturedLink: true });
equal(composer.get('missingReplyCharacters'), 0, "don't require any post content");
});
test('missingTitleCharacters', function() {
@ -105,7 +109,7 @@ test("prependText", function() {
composer.prependText("world ");
equal(composer.get('reply'), "world hello", "it prepends text to existing text");
composer.prependText("before new line", {new_line: true});
equal(composer.get('reply'), "before new line\n\nworld hello", "it prepends text with new line to existing text");
});