mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Add specs for post action guardian
This commit is contained in:
@ -364,6 +364,14 @@ This is a link http://example.com"
|
||||
expect(PostAction.count).to eq before_count
|
||||
expect(replied_user_like).to be_present
|
||||
end
|
||||
|
||||
it "does not allow unauthorized happiness" do
|
||||
post.trash!
|
||||
before_count = PostAction.count
|
||||
expect { receiver.process }.to raise_error(Email::Receiver::InvalidPostAction)
|
||||
expect(PostAction.count).to eq before_count
|
||||
expect(replied_user_like).to_not be_present
|
||||
end
|
||||
end
|
||||
|
||||
describe "like.eml" do
|
||||
|
Reference in New Issue
Block a user