mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:14:12 +08:00
FIX: do not publish all categories when a category changes.
minor fixes to UI, still needs more work for live refresh of category listing
This commit is contained in:
@ -24,6 +24,7 @@ test('create categories', function() {
|
||||
});
|
||||
|
||||
var categories = site.get('categories');
|
||||
site.get('sortedCategories');
|
||||
|
||||
present(categories, "The categories are present");
|
||||
equal(categories.length, 3, "it loaded all three categories");
|
||||
@ -36,4 +37,11 @@ test('create categories', function() {
|
||||
present(subcategory, "it loaded the subcategory");
|
||||
equal(subcategory.get('parentCategory'), parent, "it has associated the child with the parent");
|
||||
|
||||
// remove invalid category and child
|
||||
categories.removeObject(categories[2]);
|
||||
categories.removeObject(categories[1]);
|
||||
|
||||
equal(categories.length, site.get('categoriesByCount').length, "categories by count should change on removal");
|
||||
equal(categories.length, site.get('sortedCategories').length, "sorted categories should change on removal");
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user