mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
admins can now clear flags inline
This commit is contained in:
@@ -54,12 +54,29 @@ describe Post do
|
||||
topic.user.trust_level = TrustLevel.Levels[:moderator]
|
||||
Fabricate.build(:post, post_args).should be_valid
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe 'flagging helpers' do
|
||||
it 'isFlagged is accurate' do
|
||||
post = Fabricate(:post)
|
||||
user = Fabricate(:coding_horror)
|
||||
PostAction.act(user, post, PostActionType.Types[:off_topic])
|
||||
PostAction.act(post.user, post, PostActionType.Types[:spam])
|
||||
|
||||
post.reload
|
||||
post.is_flagged?.should == true
|
||||
|
||||
PostAction.remove_act(post.user, post, PostActionType.Types[:spam])
|
||||
post.reload
|
||||
post.is_flagged?.should == true
|
||||
|
||||
PostAction.remove_act(user, post, PostActionType.Types[:off_topic])
|
||||
post.reload
|
||||
post.is_flagged?.should == false
|
||||
end
|
||||
end
|
||||
|
||||
describe 'message bus' do
|
||||
it 'enqueues the post on the message bus' do
|
||||
|
||||
Reference in New Issue
Block a user