diff options
author | Gareth Rees <gareth@mysociety.org> | 2014-11-18 13:53:18 +0000 |
---|---|---|
committer | Gareth Rees <gareth@mysociety.org> | 2014-11-18 13:53:18 +0000 |
commit | 401aef5cf0bad318ac753ee5fb547e23c22deeb4 (patch) | |
tree | 4ca1ac36dcd6a183df4c9b25a1f7950dbbb73a4a /spec/controllers | |
parent | 07cfa98ae171c3e1d62956f3d3a5bf0a2ab31983 (diff) |
Use flash[:error] for error condition
Also use double quotes rather than string escaping
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/admin_public_body_categories_controller_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/controllers/admin_public_body_categories_controller_spec.rb b/spec/controllers/admin_public_body_categories_controller_spec.rb index 902327081..4fb5181be 100644 --- a/spec/controllers/admin_public_body_categories_controller_spec.rb +++ b/spec/controllers/admin_public_body_categories_controller_spec.rb @@ -180,7 +180,9 @@ describe AdminPublicBodyCategoriesController do body = FactoryGirl.create(:public_body, :tag_string => @tag) post :update, { :id => @category.id, :public_body_category => { :category_tag => "renamed" } } - request.flash[:notice].should include('can\'t') + + msg = "There are authorities associated with this category, so the tag can't be renamed" + request.flash[:error].should == msg pbc = PublicBodyCategory.find(@category.id) pbc.category_tag.should == @tag end |