PERF: Only show members count on group page.

This commit is contained in:
Guo Xiang Tan
2016-12-02 16:27:47 +08:00
parent a93c59abbf
commit bc0a8142fe
5 changed files with 3 additions and 46 deletions

View File

@ -25,19 +25,6 @@ describe GroupsController do
end
end
describe "counts" do
it "returns counts if it can be seen" do
xhr :get, :counts, group_id: group.name
expect(response).to be_success
end
it "returns no counts if it can not be seen" do
group.update_columns(visible: false)
xhr :get, :counts, group_id: group.name
expect(response).not_to be_success
end
end
describe "posts" do
it "ensures the group can be seen" do
Guardian.any_instance.expects(:can_see?).with(group).returns(false)