FIX: oneboxing to private messages

This commit is contained in:
Sam
2018-02-16 08:00:06 +11:00
parent 67526907cd
commit 57e140dc07
2 changed files with 22 additions and 4 deletions

View File

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