mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: raises an error if q param is empty in search page
This commit is contained in:
@@ -127,6 +127,11 @@ describe SearchController do
|
||||
end
|
||||
|
||||
context "#show" do
|
||||
it "doesn't raise an error when search term not specified" do
|
||||
get "/search"
|
||||
expect(response.status).to eq(200)
|
||||
end
|
||||
|
||||
it "raises an error when the search term length is less than required" do
|
||||
get "/search.json", params: { q: 'ba' }
|
||||
expect(response.status).to eq(400)
|
||||
|
||||
Reference in New Issue
Block a user