aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/general_controller_spec.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-04-30 00:57:20 +0000
committerfrancis <francis>2008-04-30 00:57:20 +0000
commitb8e91558ca7b504485eb3c67cf8cee29eea48e47 (patch)
tree8a70f9b9d9c73832cc57be397a32e550583a062c /spec/controllers/general_controller_spec.rb
parent4fc6f78113ad66b8b0381aa8a322b2c2db346864 (diff)
Fix up test code with Xapian.
Diffstat (limited to 'spec/controllers/general_controller_spec.rb')
-rw-r--r--spec/controllers/general_controller_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb
index 7a9efcbb8..355a464d6 100644
--- a/spec/controllers/general_controller_spec.rb
+++ b/spec/controllers/general_controller_spec.rb
@@ -22,13 +22,13 @@ 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', :query => "mouse") # URL /search/:query
+ response.should redirect_to(:action => 'search', :combined => "mouse") # URL /search/:query
end
it "should find info request when searching for '\"fancy dog\"'" do
#ActsAsXapian.rebuild_index([PublicBody, User, InfoRequestEvent])
ActsAsXapian.update_index
- get :search, :query => '"fancy dog"'
+ get :search, :combined => ['"fancy dog"']
response.should render_template('search')
assigns[:search_hits].should == 1
@@ -48,7 +48,7 @@ describe GeneralController, "when searching" do
it "should find public body and incoming message (in that order) when searching for 'geraldine quango'" do
ActsAsXapian.update_index
- get :search, :query => 'geraldine quango'
+ get :search, :combined => ['geraldine quango']
response.should render_template('search')
assigns[:search_hits].should == 2
@@ -60,7 +60,7 @@ describe GeneralController, "when searching" do
it "should find incoming message and public body (in that order) when searching for 'geraldine quango', newest first" do
ActsAsXapian.update_index
- get :search, :query => 'geraldine quango', :sortby => 'newest'
+ get :search, :combined => ['geraldine quango','newest']
response.should render_template('search')
assigns[:search_hits].should == 2