diff options
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/general_controller_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb index 7807a5541..619635eea 100644 --- a/spec/controllers/general_controller_spec.rb +++ b/spec/controllers/general_controller_spec.rb @@ -17,6 +17,13 @@ describe GeneralController, "when searching" do response.should be_success end + it "doesn't raise an error when there's no user matching the one in the session" do + session[:user_id] = 999 + get :frontpage + response.should be_success + end + + it "should redirect from search query URL to pretty URL" do post :search_redirect, :query => "mouse" # query hidden in POST parameters response.should redirect_to(:action => 'search', :combined => "mouse") # URL /search/:query |