Fix all the errors to get our tests green on Rails 5.1.

This commit is contained in:
Guo Xiang Tan
2017-08-31 12:06:56 +08:00
parent 898ee93547
commit 77d4c4d8dc
989 changed files with 5114 additions and 3117 deletions

View File

@ -75,8 +75,13 @@ describe CookedPostProcessor do
end
it "cleans the reverse index up for the current post" do
PostUpload.expects(:delete_all).with(post_id: post.id)
cpp.keep_reverse_index_up_to_date
post_uploads_ids = post.post_uploads.pluck(:id)
cpp.keep_reverse_index_up_to_date
expect(post.reload.post_uploads.pluck(:id)).to_not eq(post_uploads_ids)
end
end