diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-09-28 01:02:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-28 01:02:21 +0200 |
commit | ab33c4df942ec3fdc4d891f3db7ac8cdd3436945 (patch) | |
tree | b526a52c980fef122d38302234c0bb8361f6bd14 /spec | |
parent | 234c729c5244160c89070960fd06de23ae31e13a (diff) |
Add `exclude_unreviewed` param to `GET /api/v2/search` REST API (#11977)
Make it so normal search returns even unreviewed matches, but autosuggestions do not. Fix #11960
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/search_service_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/services/search_service_spec.rb b/spec/services/search_service_spec.rb index ade306ed2..739bb9cf5 100644 --- a/spec/services/search_service_spec.rb +++ b/spec/services/search_service_spec.rb @@ -77,10 +77,10 @@ describe SearchService, type: :service do it 'includes the tag in the results' do query = '#tag' tag = Tag.new - allow(Tag).to receive(:search_for).with('tag', 10, 0).and_return([tag]) + allow(Tag).to receive(:search_for).with('tag', 10, 0, exclude_unreviewed: nil).and_return([tag]) results = subject.call(query, nil, 10) - expect(Tag).to have_received(:search_for).with('tag', 10, 0) + expect(Tag).to have_received(:search_for).with('tag', 10, 0, exclude_unreviewed: nil) expect(results).to eq empty_results.merge(hashtags: [tag]) end it 'does not include tag when starts with @ character' do |