diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-05-04 13:49:49 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-05-04 13:49:49 +0100 |
commit | 6819aa8c2a9e2fd1b78d434a2a4133e5781b28b5 (patch) | |
tree | a7347dc4788c7667b7d5286da37944224550497c /spec/integration/search_request_spec.rb | |
parent | be0c3416917645ab190fba3cb937ce6893a291e1 (diff) |
Ensure we redirect to the URL-based version of a search, when specified as a query string, even when the variety of search is "all". Fixes #448
Diffstat (limited to 'spec/integration/search_request_spec.rb')
-rw-r--r-- | spec/integration/search_request_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/integration/search_request_spec.rb b/spec/integration/search_request_spec.rb index b62f0a4c4..17a7b4aaa 100644 --- a/spec/integration/search_request_spec.rb +++ b/spec/integration/search_request_spec.rb @@ -12,6 +12,13 @@ describe "When searching" do response.body.should include(""mouse stilton"") end + it "should redirect requests with search in query string to URL-based page" do + url = '/search/all?query=bob' + request_via_redirect("post", url) + response.request.url.should_not include(url) + response.request.url.should include("/search/bob/all") + end + it "should correctly execute simple search" do request_via_redirect("post", "/search", :query => 'bob' |