Merge branch 'master' of github.com:discourse/discourse

This commit is contained in:
Robin Ward
2013-02-06 20:59:07 -05:00
16 changed files with 127 additions and 13 deletions

View File

@ -111,6 +111,13 @@ describe PostAction do
describe 'flagging' do
it 'does not allow you to flag stuff with 2 reasons' do
post = Fabricate(:post)
u1 = Fabricate(:evil_trout)
PostAction.act(u1, post, PostActionType.Types[:spam])
lambda { PostAction.act(u1, post, PostActionType.Types[:off_topic]) }.should raise_error(PostAction::AlreadyFlagged)
end
it 'should update counts when you clear flags' do
post = Fabricate(:post)
u1 = Fabricate(:evil_trout)