aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers
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
parent4fc6f78113ad66b8b0381aa8a322b2c2db346864 (diff)
Fix up test code with Xapian.
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/general_controller_spec.rb8
-rw-r--r--spec/controllers/request_controller_spec.rb2
2 files changed, 5 insertions, 5 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
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 05e53b1f4..4855a88c2 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -23,7 +23,7 @@ describe RequestController, "when listing all requests" do
# reverse-chronological order
assigns[:search_results].size.should == 2
assigns[:search_results][0][:model].should == info_request_events(:silly_outgoing_message_event)
- assigns[:search_results][1][:model].should == info_request_events(:useless_incoming_message_event)
+ assigns[:search_results][1][:model].should == info_request_events(:useless_outgoing_message_event)
end
end