diff options
author | Francis Irving <francis@mysociety.org> | 2010-08-04 00:15:07 +0100 |
---|---|---|
committer | Francis Irving <francis@mysociety.org> | 2010-08-04 00:15:07 +0100 |
commit | cbb1023f86be15a3ce7efc9b0e54e1725c9561cf (patch) | |
tree | 98f1ba277e593b83f90237f6a8ee30a8048f0907 /spec/controllers/public_body_controller_spec.rb | |
parent | ce7c493b8158a29b637bef37dcf3d0d9eaa758b7 (diff) |
Allow links to specific tags.
Diffstat (limited to 'spec/controllers/public_body_controller_spec.rb')
-rw-r--r-- | spec/controllers/public_body_controller_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb index aae72dad9..ec7417400 100644 --- a/spec/controllers/public_body_controller_spec.rb +++ b/spec/controllers/public_body_controller_spec.rb @@ -68,6 +68,27 @@ describe PublicBodyController, "when listing bodies" do end + it "should list a machine tagged thing, should get it in both ways" do + public_bodies(:humpadink_public_body).tag_string = "eats_cheese:stilton" + + get :list, :tag => "eats_cheese" + response.should render_template('list') + assigns[:public_bodies].should == [ public_bodies(:humpadink_public_body) ] + assigns[:tag].should == "eats_cheese" + + get :list, :tag => "eats_cheese:jarlsberg" + response.should render_template('list') + assigns[:public_bodies].should == [ ] + assigns[:tag].should == "eats_cheese:jarlsberg" + + get :list, :tag => "eats_cheese:stilton" + response.should render_template('list') + assigns[:public_bodies].should == [ public_bodies(:humpadink_public_body) ] + assigns[:tag].should == "eats_cheese:stilton" + + + end + end |