specs, stay on page
This commit is contained in:
parent
eb65074360
commit
66acd7db14
2 changed files with 5 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ class PeopleController < ApplicationController
|
|||
return
|
||||
elsif (params[:q][0] == 35 || params[:q][0] == '#') && params[:q].length == 1
|
||||
flash[:error] = I18n.t('tags.show.none', :name => params[:q])
|
||||
redirect_to multi_path()
|
||||
redirect_to :back
|
||||
end
|
||||
|
||||
limit = params[:limit] ? params[:limit].to_i : 15
|
||||
|
|
|
|||
|
|
@ -91,6 +91,10 @@ describe PeopleController do
|
|||
get :index, :q => '#babi.es'
|
||||
response.should redirect_to(tag_path('babies', :q => '#babi.es'))
|
||||
end
|
||||
|
||||
it 'stay on the page if you search for the empty hash' do
|
||||
get :index, :q => '#'
|
||||
response.should redirect_to(:back)
|
||||
end
|
||||
|
||||
describe '#tag_index' do
|
||||
|
|
|
|||
Loading…
Reference in a new issue