about summary refs log tree commit diff
path: root/spec
diff options
context:
space:
mode:
author178inaba <magic.brain.evolution.7.0@gmail.com>2017-04-25 11:44:43 +0900
committerEugen <eugen@zeonfederated.com>2017-04-25 04:44:43 +0200
commitd2159deaf272de265ba11f16a92d60ea61def19f (patch)
treea01b095c6dd76cac6c3b2d8e16f4ed9ded32565a /spec
parent17c591ffba59bda512fe43a09c06c40324acc472 (diff)
Optimize account search (#2421)
Diffstat (limited to 'spec')
-rw-r--r--spec/services/account_search_service_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/services/account_search_service_spec.rb b/spec/services/account_search_service_spec.rb
index 723623833..b7c281a56 100644
--- a/spec/services/account_search_service_spec.rb
+++ b/spec/services/account_search_service_spec.rb
@@ -13,6 +13,12 @@ describe AccountSearchService do
 
         expect(results).to eq []
       end
+      it 'returns empty array for limit zero' do
+        Fabricate(:account, username: 'match')
+        results = subject.call('match', 0)
+
+        expect(results).to eq []
+      end
     end
 
     describe 'searching for a simple term that is not an exact match' do