mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: replace curly quotes to regular quotes in search terms
This commit is contained in:
@@ -71,6 +71,17 @@ describe Search do
|
||||
expect(search.clean_term).to eq('capybara')
|
||||
end
|
||||
|
||||
it 'replaces curly quotes to regular quotes in search terms' do
|
||||
term = '“discourse”'
|
||||
|
||||
expect(term == '"discourse"').to eq(false)
|
||||
|
||||
search = Search.new(term)
|
||||
expect(search.valid?).to eq(true)
|
||||
expect(search.term).to eq('"discourse"')
|
||||
expect(search.clean_term).to eq('"discourse"')
|
||||
end
|
||||
|
||||
it 'does not search when the search term is too small' do
|
||||
search = Search.new('evil', min_search_term_length: 5)
|
||||
search.execute
|
||||
|
||||
Reference in New Issue
Block a user