diff options
author | Raphael Sofaer <raphael@joindiaspora.com> | 2011-06-15 05:06:13 +0400 |
---|---|---|
committer | Raphael Sofaer <raphael@joindiaspora.com> | 2011-06-15 05:06:13 +0400 |
commit | cba63030c998336dc58ee7e9b39cbd55baeb6f88 (patch) | |
tree | bb199549663e4ad6f4cc5a1af38cdb891b4c6916 /spec/controllers/comments_controller_spec.rb | |
parent | 800e701f894e60fb27a72291fbdbec4209322588 (diff) |
Use rescue_from in CommentsController
Diffstat (limited to 'spec/controllers/comments_controller_spec.rb')
-rw-r--r-- | spec/controllers/comments_controller_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/controllers/comments_controller_spec.rb b/spec/controllers/comments_controller_spec.rb index a857e886d..8b1f3dd18 100644 --- a/spec/controllers/comments_controller_spec.rb +++ b/spec/controllers/comments_controller_spec.rb @@ -111,5 +111,10 @@ describe CommentsController do response.status.should == 403 end end + it 'renders nothing and 404 on a nonexistent comment' do + delete :destroy, :id => 343415 + response.status.should == 404 + response.body.strip.should be_empty + end end -end
\ No newline at end of file +end |