mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
flagging workflow changes per http://meta.discourse.org/t/we-need-an-archive-flag-notification-button/7450
This commit is contained in:
@@ -84,6 +84,20 @@ describe PostAction do
|
||||
PostAction.flagged_posts_count.should == 0
|
||||
end
|
||||
|
||||
it "should ignore validated flags" do
|
||||
admin = Fabricate(:admin)
|
||||
PostAction.act(codinghorror, post, PostActionType.types[:off_topic])
|
||||
post.hidden.should be_false
|
||||
PostAction.defer_flags!(post, admin.id)
|
||||
PostAction.flagged_posts_count.should == 0
|
||||
post.reload
|
||||
post.hidden.should be_false
|
||||
|
||||
PostAction.hide_post!(post)
|
||||
post.reload
|
||||
post.hidden.should be_true
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe "when a user bookmarks something" do
|
||||
@@ -220,7 +234,7 @@ describe PostAction do
|
||||
u2 = Fabricate(:walter_white)
|
||||
admin = Fabricate(:admin) # we need an admin for the messages
|
||||
|
||||
SiteSetting.flags_required_to_hide_post = 2
|
||||
SiteSetting.stubs(:flags_required_to_hide_post).returns(2)
|
||||
|
||||
PostAction.act(u1, post, PostActionType.types[:spam])
|
||||
PostAction.act(u2, post, PostActionType.types[:spam])
|
||||
|
||||
Reference in New Issue
Block a user