diff --git a/app/models/post.rb b/app/models/post.rb
index 2906c61c9ee..98a7d3878d8 100644
--- a/app/models/post.rb
+++ b/app/models/post.rb
@@ -117,7 +117,7 @@ class Post < ActiveRecord::Base
scope :have_uploads, -> {
where(
- "(posts.cooked LIKE '%").id
ids << Fabricate(:post, cooked: "A post with optimized image ").id
Fabricate(:post, cooked: "A post with external link ")
+ ids << Fabricate(:post, cooked: 'A post with missing upload ').id
expect(Post.have_uploads.order(:id).pluck(:id)).to eq(ids)
end
end