diff options
author | Henare Degan <henare.degan@gmail.com> | 2012-01-31 17:17:13 +1100 |
---|---|---|
committer | Henare Degan <henare.degan@gmail.com> | 2012-01-31 17:17:13 +1100 |
commit | 8dbc0b891801e1605ae08774eae69f71242808d6 (patch) | |
tree | aa0cf1c26600f03c9b64cd2ffdc73aeb15b85be2 /spec/controllers/admin_public_body_controller_spec.rb | |
parent | 99d30f0f31578c462ef317b4dc98b112196fe713 (diff) |
Fixes #393 - Route the mass_assign_tags action so it does what it says on the tin
Diffstat (limited to 'spec/controllers/admin_public_body_controller_spec.rb')
-rw-r--r-- | spec/controllers/admin_public_body_controller_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/controllers/admin_public_body_controller_spec.rb b/spec/controllers/admin_public_body_controller_spec.rb index 6954e22a1..a2f458025 100644 --- a/spec/controllers/admin_public_body_controller_spec.rb +++ b/spec/controllers/admin_public_body_controller_spec.rb @@ -61,6 +61,14 @@ describe AdminPublicBodyController, "when administering public bodies" do get :show, :id => 2 session[:using_admin].should == 1 end + + it "mass assigns tags" do + n = PublicBody.count + post :mass_tag_add, { :new_tag => "department", :table_name => "substring" } + response.flash[:notice].should == "Added tag to table of bodies." + response.should redirect_to(:action=>'list') + PublicBody.find_by_tag("department").count.should == n + end end describe AdminPublicBodyController, "when administering public bodies and paying attention to authentication" do |