Revert "FEATURE: Can create warnings for users via PM"

This reverts commit b0bfc1f93f18b19143a59eafd6d8d2e84a872dcc.
This commit is contained in:
Robin Ward
2014-09-08 10:38:59 -04:00
parent b0bfc1f93f
commit 1c7559380c
37 changed files with 18 additions and 243 deletions

View File

@ -384,7 +384,6 @@ describe PostsController do
describe 'when logged in' do
let!(:user) { log_in }
let(:moderator) { log_in(:moderator) }
let(:new_post) { Fabricate.build(:post, user: user) }
it "raises an exception without a raw parameter" do
@ -493,24 +492,6 @@ describe PostsController do
xhr :post, :create, {raw: 'hello', meta_data: {xyz: 'abc'}}
end
context "is_warning" do
it "doesn't pass `is_warning` through if you're not staff" do
PostCreator.expects(:new).with(user, Not(has_entries('is_warning' => true))).returns(post_creator)
xhr :post, :create, {raw: 'hello', archetype: 'private_message', is_warning: 'true'}
end
it "passes `is_warning` through if you're staff" do
PostCreator.expects(:new).with(moderator, has_entries('is_warning' => true)).returns(post_creator)
xhr :post, :create, {raw: 'hello', archetype: 'private_message', is_warning: 'true'}
end
it "passes `is_warning` as false through if you're staff" do
PostCreator.expects(:new).with(moderator, has_entries('is_warning' => false)).returns(post_creator)
xhr :post, :create, {raw: 'hello', archetype: 'private_message', is_warning: 'false'}
end
end
end
end