diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-12-21 14:26:41 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-12-21 14:26:41 +0000 |
commit | ef29e5ef9618a4b1e965408df87ed2f4217da6ae (patch) | |
tree | f4fc163184f92e2a7cc29669765ccdf5c16796ff /spec/controllers/request_controller_spec.rb | |
parent | 4075d5a70a6e08c1d55e97dbfc13fda4a2faaf84 (diff) | |
parent | 54acb0afaca770c14a7529f292eba3768e3a5040 (diff) |
Merge branch 'develop' into cache-foi-attachments-seb
Conflicts:
app/controllers/request_controller.rb
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 9eddbc294..74a55062d 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -1458,7 +1458,7 @@ describe RequestController, "when doing type ahead searches" do it "should return nothing for the empty query string" do get :search_typeahead, :q => "" response.should render_template('request/_search_ahead.rhtml') - assigns[:xapian_requests].results.size.should == 0 + assigns[:xapian_requests].should be_nil end it "should return a request matching the given keyword, but not users with a matching description" do @@ -1476,11 +1476,10 @@ describe RequestController, "when doing type ahead searches" do assigns[:xapian_requests].results[1][:model].title.should == info_requests(:naughty_chicken_request).title end - it "should return partial matches" do - get :search_typeahead, :q => "chick" # 'chick' for 'chicken' + it "should not return matches for short words" do + get :search_typeahead, :q => "a" response.should render_template('request/_search_ahead.rhtml') - assigns[:xapian_requests].results.size.should == 1 - assigns[:xapian_requests].results[0][:model].title.should == info_requests(:naughty_chicken_request).title + assigns[:xapian_requests].should be_nil end end |