mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
flagging work, we should be clearing from the mod menu if a topic or post is deleted
This commit is contained in:
@@ -27,6 +27,19 @@ describe PostAction do
|
||||
PostAction.flagged_posts_count.should == 0
|
||||
end
|
||||
|
||||
it "should reset counts when a topic is deleted" do
|
||||
PostAction.act(codinghorror, post, PostActionType.Types[:off_topic])
|
||||
post.topic.destroy
|
||||
PostAction.flagged_posts_count.should == 0
|
||||
end
|
||||
|
||||
it "should reset counts when a post is deleted" do
|
||||
post2 = Fabricate(:post, topic_id: post.topic_id)
|
||||
PostAction.act(codinghorror, post2, PostActionType.Types[:off_topic])
|
||||
post2.destroy
|
||||
PostAction.flagged_posts_count.should == 0
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
it "increases the post's bookmark count when saved" do
|
||||
|
||||
Reference in New Issue
Block a user