DEV: Add spec for searching for whisper posts.

DEV: Add spec for searching for whisper posts.

diff --git a/spec/components/search_spec.rb b/spec/components/search_spec.rb
index f01fed5..d0def19 100644
--- a/spec/components/search_spec.rb
+++ b/spec/components/search_spec.rb
@@ -395,7 +395,11 @@ describe Search do
   end
 
   context 'posts' do
-    let(:post) { Fabricate(:post) }
+    fab!(:post) do
+      SearchIndexer.enable
+      Fabricate(:post)
+    end
+
     let(:topic) { post.topic }
 
     let!(:reply) do
@@ -488,6 +492,18 @@ describe Search do
     ensure
       Discourse.cache.clear
     end
+
+    it 'allows staff to search for whispers' do
+      post.update!(post_type: Post.types[:whisper], raw: 'this is a tiger')
+
+      results = Search.execute('tiger')
+
+      expect(results.posts).to eq([])
+
+      results = Search.execute('tiger', guardian: Guardian.new(admin))
+
+      expect(results.posts).to eq([post])
+    end
   end
 
   context 'topics' do

GitHub sha: 309e41d3