FIX: Various improvements to post notices.

- Notices are visible only by poster and trust level 2+ users.
- Notices are not generated for non-human or staged users.
- Notices are deleted when post is deleted.
This commit is contained in:
Dan Ungureanu
2019-03-11 11:19:58 +02:00
parent d82876896e
commit b28b418363
6 changed files with 54 additions and 23 deletions

View File

@@ -143,14 +143,9 @@ describe Post do
post
}
before do
post.trash!
post.reload
end
describe 'recovery' do
it 'deletes notices' do
expect { post.recover! }
expect { post.trash! }
.to change { post.custom_fields.length }.from(2).to(0)
end
end