diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/general_controller_spec.rb | 2 | ||||
-rw-r--r-- | spec/integration/search_request_spec.rb | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb index 4d7f1831d..1ffbda90d 100644 --- a/spec/controllers/general_controller_spec.rb +++ b/spec/controllers/general_controller_spec.rb @@ -64,7 +64,7 @@ describe GeneralController, "when searching" do 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", :view => "all") # URL /search/:query/all + response.should redirect_to(:action => 'search', :combined => "mouse", :view => "requests") # URL /search/:query/all end describe "when using different locale settings" do diff --git a/spec/integration/search_request_spec.rb b/spec/integration/search_request_spec.rb index 8e714eb27..25c091111 100644 --- a/spec/integration/search_request_spec.rb +++ b/spec/integration/search_request_spec.rb @@ -25,14 +25,19 @@ describe "When searching" do request_via_redirect("post", "/search", :query => 'bob' ) - response.body.should include("One person found") + response.body.should include("FOI requests") end it "should correctly filter searches for requests" do request_via_redirect("post", "/search/bob/requests") - response.body.should_not include("One person matching") + response.body.should_not include("One person found") response.body.should include("FOI requests 1 to 2 of 2") end + it "should correctly filter searches for users" do + request_via_redirect("post", "/search/bob/users") + response.body.should include("One person found") + response.body.should_not include("FOI requests 1 to 2 of 2") + end it "should correctly filter searches for successful requests" do request_via_redirect("post", "/search", |