diff options
Diffstat (limited to 'spec/controllers')
-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 |