diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-10-30 12:47:58 +0000 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-11-11 16:02:18 +0000 |
commit | c8fc7884e1e13e7a46ea720fe7fd4d47d095a67f (patch) | |
tree | 723c2cc79963fbfc53eaa476cde69dbff95bce43 /spec/controllers | |
parent | 89742de35899c1ca08693fc7dd56bf233ab44fd7 (diff) |
RequestController#search_typeahead filter by body
Action now supports the `request_from` param as per the Xapian filtering
system to filter search typeaheads by public body
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 6c0f4573e..ce91f7a83 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -2380,6 +2380,12 @@ describe RequestController, "when doing type ahead searches" do get :search_typeahead, :q => "dog -chicken" assigns[:xapian_requests].results.size.should == 1 end + + it 'can filter search results by public body' do + get :search_typeahead, :q => 'boring', :requested_from => 'dfh' + expect(assigns[:query]).to eq('requested_from:dfh boring') + end + end describe RequestController, "when showing similar requests" do |