Failing spec for empty search bug #2427
This commit is contained in:
parent
c62a9a2e63
commit
3c74f3d848
1 changed files with 6 additions and 1 deletions
|
|
@ -91,11 +91,16 @@ describe PeopleController do
|
||||||
get :index, :q => '#babi.es'
|
get :index, :q => '#babi.es'
|
||||||
response.should redirect_to(tag_path('babies', :q => '#babi.es'))
|
response.should redirect_to(tag_path('babies', :q => '#babi.es'))
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'stay on the page if you search for the empty hash' do
|
it 'stay on the page if you search for the empty hash' do
|
||||||
get :index, :q => '#'
|
get :index, :q => '#'
|
||||||
flash[:error].should be_present
|
flash[:error].should be_present
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'does not fails if you search for the empty term' do
|
||||||
|
get :index, :q => ''
|
||||||
|
response.should be_success
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#tag_index' do
|
describe '#tag_index' do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue