mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #5807 from discourse/min-flags-by-topic
FEATURE: New site setting `min_flags_staff_visibility`
This commit is contained in:
@@ -141,6 +141,17 @@ describe PostAction do
|
||||
expect(PostAction.flagged_posts_count).to eq(0)
|
||||
end
|
||||
|
||||
it "respects min_flags_staff_visibility" do
|
||||
SiteSetting.min_flags_staff_visibility = 2
|
||||
expect(PostAction.flagged_posts_count).to eq(0)
|
||||
|
||||
PostAction.act(codinghorror, post, PostActionType.types[:off_topic])
|
||||
expect(PostAction.flagged_posts_count).to eq(0)
|
||||
|
||||
PostAction.act(eviltrout, post, PostActionType.types[:off_topic])
|
||||
expect(PostAction.flagged_posts_count).to eq(1)
|
||||
end
|
||||
|
||||
it "should reset counts when a topic is deleted" do
|
||||
PostAction.act(codinghorror, post, PostActionType.types[:off_topic])
|
||||
post.topic.trash!
|
||||
|
||||
Reference in New Issue
Block a user