mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
PERF: Fix N+1 queries when loading groups.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import { acceptance } from "helpers/qunit-helpers";
|
||||
import { acceptance, logIn } from "helpers/qunit-helpers";
|
||||
|
||||
acceptance("Groups");
|
||||
|
||||
test("Browsing Groups", () => {
|
||||
@ -24,6 +25,18 @@ test("Browsing Groups", () => {
|
||||
|
||||
visit("/groups/discourse/messages");
|
||||
andThen(() => {
|
||||
ok($('.action-list li').length === 4, 'it should not show messages tab');
|
||||
ok(count('.user-stream .item') > 0, "it lists stream items");
|
||||
});
|
||||
});
|
||||
|
||||
test("Messages tab", () => {
|
||||
logIn();
|
||||
Discourse.reset();
|
||||
|
||||
visit("/groups/discourse");
|
||||
|
||||
andThen(() => {
|
||||
ok($('.action-list li').length === 5, 'it should show messages tab if user is admin');
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user