mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
FEATURE: Allow posting a link with topics
This commit is contained in:
@ -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");
|
||||
});
|
||||
|
Reference in New Issue
Block a user