FIX: with featured links enabled and uncategorized topic not allowed, allow featued links behaviour before choosing a category

This commit is contained in:
Neil Lalonde
2016-12-21 13:39:41 -05:00
parent 0d826ea933
commit 783490f763
2 changed files with 10 additions and 1 deletions

View File

@@ -248,3 +248,11 @@ test("title placeholder depends on what you're doing", function() {
composer = createComposer({action: Composer.PRIVATE_MESSAGE});
equal(composer.get('titlePlaceholder'), 'composer.title_placeholder', "placeholder for private message with topic links enabled");
});
test("allows featured link before choosing a category", function() {
Discourse.SiteSettings.topic_featured_link_enabled = true;
Discourse.SiteSettings.allow_uncategorized_topics = false;
let composer = createComposer({action: Composer.CREATE_TOPIC});
equal(composer.get('titlePlaceholder'), 'composer.title_or_link_placeholder', "placeholder invites you to paste a link");
ok(composer.get('canEditTopicFeaturedLink'), "can paste link");
});