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:
Sam
2016-04-12 12:28:18 +10:00
parent cb6d1632ba
commit 22b2f5285c
4 changed files with 24 additions and 3 deletions

View File

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