mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user