Add specs for post action guardian

This commit is contained in:
James Kiesel
2015-12-30 20:52:36 +01:00
parent a559754db3
commit 6ceb108946
4 changed files with 32 additions and 2 deletions

View File

@ -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