diff options
author | Robin Houston <robin.houston@gmail.com> | 2012-01-12 13:52:36 +0000 |
---|---|---|
committer | Robin Houston <robin.houston@gmail.com> | 2012-01-12 13:52:36 +0000 |
commit | d84353a0dbff7c4543c7f4423d7b63728c7041c3 (patch) | |
tree | 2bcfaa2b7cbe0eedccad518c8c2d064203a2143c /spec/controllers/public_body_controller_spec.rb | |
parent | 2d0524b90108004d67b5ee7f21b7b69ebf8eb3df (diff) | |
parent | 21ee1ca03faa722119a3c7e587a843b960783096 (diff) |
Merge branch 'release/0.5' of github.com:sebbacon/alaveteli into release/0.5
Diffstat (limited to 'spec/controllers/public_body_controller_spec.rb')
-rw-r--r-- | spec/controllers/public_body_controller_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb index 8182e1331..3996bd520 100644 --- a/spec/controllers/public_body_controller_spec.rb +++ b/spec/controllers/public_body_controller_spec.rb @@ -175,20 +175,20 @@ describe PublicBodyController, "when doing type ahead searches" do fixtures :public_bodies, :public_body_translations, :public_body_versions, :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things it "should return nothing for the empty query string" do - get :search_typeahead, :q => "" + get :search_typeahead, :query => "" response.should render_template('public_body/_search_ahead') assigns[:xapian_requests].should be_nil end it "should return a body matching the given keyword, but not users with a matching description" do - get :search_typeahead, :q => "Geraldine" + get :search_typeahead, :query => "Geraldine" response.should render_template('public_body/_search_ahead') assigns[:xapian_requests].results.size.should == 1 assigns[:xapian_requests].results[0][:model].name.should == public_bodies(:geraldine_public_body).name end it "should return all requests matching any of the given keywords" do - get :search_typeahead, :q => "Geraldine Humpadinking" + get :search_typeahead, :query => "Geraldine Humpadinking" response.should render_template('public_body/_search_ahead') assigns[:xapian_requests].results.size.should == 2 assigns[:xapian_requests].results[0][:model].name.should == public_bodies(:humpadink_public_body).name @@ -196,14 +196,14 @@ describe PublicBodyController, "when doing type ahead searches" do end it "should return requests matching the given keywords in any of their locales" do - get :search_typeahead, :q => "baguette" # part of the spanish notes + get :search_typeahead, :query => "baguette" # part of the spanish notes response.should render_template('public_body/_search_ahead') assigns[:xapian_requests].results.size.should == 1 assigns[:xapian_requests].results[0][:model].name.should == public_bodies(:humpadink_public_body).name end it "should not return matches for short words" do - get :search_typeahead, :q => "b" + get :search_typeahead, :query => "b" response.should render_template('public_body/_search_ahead') assigns[:xapian_requests].should be_nil end |