mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: admin dashboard posts count should not include system posts and whispers
This commit is contained in:
@@ -209,5 +209,15 @@ describe Report do
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe 'posts counts' do
|
||||
it "only counts regular posts" do
|
||||
post = Fabricate(:post)
|
||||
Fabricate(:moderator_post, topic: post.topic)
|
||||
Fabricate.build(:post, post_type: Post.types[:whisper], topic: post.topic)
|
||||
post.topic.add_small_action(Fabricate(:admin), "invited_group", 'coolkids')
|
||||
r = Report.find('posts')
|
||||
expect(r.total).to eq(1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user