FIX: broken specs after new link alerting code

This commit is contained in:
Sam
2014-03-18 15:22:39 +11:00
parent 9fd7b0b814
commit 5c26b3dad1
10 changed files with 129 additions and 91 deletions

View File

@ -210,8 +210,7 @@ describe PostRevisor do
before do
SiteSetting.stubs(:newuser_max_images).returns(0)
url = "http://i.imgur.com/FGg7Vzu.gif"
# this test is problamatic, it leaves state in the onebox cache
Oneboxer.stubs(:onebox).with(url, anything).returns("<img src='#{url}'>")
Oneboxer.stubs(:cached_onebox).with(url, anything).returns("<img src='#{url}'>")
subject.revise!(post.user, "So, post them here!\n#{url}")
end