mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: extract links in post processor
when oneboxes are not cached or are refreshed they can introduce new links, these links must be extracted otherwise you can not follow them
This commit is contained in:
@ -387,8 +387,12 @@ describe PostsController do
|
||||
end
|
||||
|
||||
it "extracts links from the new body" do
|
||||
TopicLink.expects(:extract_from).with(post)
|
||||
xhr :put, :update, update_params
|
||||
param = update_params
|
||||
param[:post][:raw] = 'I just visited this https://google.com so many cool links'
|
||||
|
||||
xhr :put, :update, param
|
||||
expect(response).to be_success
|
||||
expect(TopicLink.count).to eq(1)
|
||||
end
|
||||
|
||||
it "doesn't allow updating of deleted posts" do
|
||||
|
Reference in New Issue
Block a user