mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:36:40 +08:00
Add specs for post action guardian
This commit is contained in:
parent
a559754db3
commit
6ceb108946
4 changed files with 32 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue