|
|
@ -83,6 +83,7 @@ describe SearchService, type: :service do |
|
|
|
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 |
|
|
|
query = '@username' |
|
|
|
allow(Tag).to receive(:search_for) |
|
|
@ -91,6 +92,7 @@ describe SearchService, type: :service do |
|
|
|
expect(Tag).not_to have_received(:search_for) |
|
|
|
expect(results).to eq empty_results |
|
|
|
end |
|
|
|
|
|
|
|
it 'does not include account when starts with # character' do |
|
|
|
query = '#tag' |
|
|
|
allow(AccountSearchService).to receive(:new) |
|
|
|