diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-08-29 13:13:59 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-08-29 13:13:59 +0100 |
commit | b41edc7ae069e6071f7ff7223c1e60cca5e75e8c (patch) | |
tree | f2d7a1d218465247843036ccf8153fd8994afd30 /spec/controllers/public_body_controller_spec.rb | |
parent | eef876ff7ce15f1a15e6760a1f251c98d383cf4e (diff) |
Add tests & fixes for new search/filtering functionality
Diffstat (limited to 'spec/controllers/public_body_controller_spec.rb')
-rw-r--r-- | spec/controllers/public_body_controller_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb index 0ac2726ea..df3fc10dc 100644 --- a/spec/controllers/public_body_controller_spec.rb +++ b/spec/controllers/public_body_controller_spec.rb @@ -78,6 +78,16 @@ describe PublicBodyController, "when listing bodies" do assigns[:description].should == "all" end + it "should support simple searching of bodies by title" do + get :list, :public_body_query => 'quango' + assigns[:public_bodies].should == [ public_bodies(:geraldine_public_body) ] + end + + it "should support simple searching of bodies by notes" do + get :list, :public_body_query => 'Albatross' + assigns[:public_bodies].should == [ public_bodies(:humpadink_public_body) ] + end + it "should list bodies in alphabetical order with different locale" do I18n.default_locale = :es get :list |