Fix broken specs since all urls will be oneboxed.

This commit is contained in:
Guo Xiang Tan
2017-01-06 10:05:51 +08:00
parent f473a119ff
commit d10fe51b72
3 changed files with 11 additions and 9 deletions
+2 -2
View File
@@ -239,12 +239,12 @@ describe UserDestroyer do
it "doesn't add ScreenedUrl records by default" do
ScreenedUrl.expects(:watch).never
UserDestroyer.new(@admin).destroy(@user, {delete_posts: true})
UserDestroyer.new(@admin).destroy(@user, delete_posts: true)
end
it "adds ScreenedUrl records when :block_urls is true" do
ScreenedUrl.expects(:watch).with(anything, anything, has_key(:ip_address)).at_least_once
UserDestroyer.new(@admin).destroy(@user, {delete_posts: true, block_urls: true})
UserDestroyer.new(@admin).destroy(@user, delete_posts: true, block_urls: true)
end
end