mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FIX: oneboxing to private messages
This commit is contained in:
@ -129,6 +129,16 @@ describe OneboxController do
|
||||
expect(response.body).not_to include('blockquote')
|
||||
end
|
||||
|
||||
it 'does not allow onebox of PMs' do
|
||||
user = log_in
|
||||
|
||||
post = create_post(archetype: 'private_message', target_usernames: [user.username])
|
||||
url = Discourse.base_url + post.url
|
||||
|
||||
get :show, params: { url: url }, format: :json
|
||||
expect(response.body).not_to include('blockquote')
|
||||
end
|
||||
|
||||
it 'allows onebox to public topics/posts in PM' do
|
||||
log_in
|
||||
|
||||
|
Reference in New Issue
Block a user