From cbb1023f86be15a3ce7efc9b0e54e1725c9561cf Mon Sep 17 00:00:00 2001 From: Francis Irving Date: Wed, 4 Aug 2010 00:15:07 +0100 Subject: Allow links to specific tags. --- spec/controllers/public_body_controller_spec.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'spec/controllers') 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 -- cgit v1.2.3