FIX: TopicEmbed.import should update title and author

This commit is contained in:
Kyle Zhao
2018-04-18 15:22:43 -04:00
committed by Sam
parent a2bc2ca08f
commit 0cc4b42180
3 changed files with 24 additions and 2 deletions

View File

@ -41,8 +41,12 @@ describe TopicEmbed do
end
it "Supports updating the post" do
post = TopicEmbed.import(user, url, title, "muhahaha new contents!")
new_user = Fabricate(:user)
post = TopicEmbed.import(new_user, url, title, "muhahaha new contents!")
expect(post.cooked).to match(/new contents/)
expect(post.user).to eq(new_user)
end
it "Should leave uppercase Feed Entry URL untouched in content" do