mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 20:44:40 +08:00
deleting posts as an admin was bust
This commit is contained in:
@ -9,6 +9,7 @@ describe PostDestroyer do
|
||||
describe 'basic destroying' do
|
||||
|
||||
let(:moderator) { Fabricate(:moderator) }
|
||||
let(:admin) { Fabricate(:admin) }
|
||||
|
||||
context "as the creator of the post" do
|
||||
before do
|
||||
@ -38,6 +39,16 @@ describe PostDestroyer do
|
||||
post.deleted_at.should be_present
|
||||
end
|
||||
end
|
||||
|
||||
context "as an admin" do
|
||||
before do
|
||||
PostDestroyer.new(admin, post).destroy
|
||||
end
|
||||
|
||||
it "deletes the post" do
|
||||
post.deleted_at.should be_present
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user