Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add few specs to Admin::FeedbackConrtoller

  • Loading branch information...
commit 0549c06cb234d63b977dc13e78f7fb75ea5fe2e8 1 parent 3949648
@yaf yaf authored
Showing with 9 additions and 3 deletions.
  1. +9 −3 spec/controllers/admin/feedback_controller_spec.rb
View
12 spec/controllers/admin/feedback_controller_spec.rb
@@ -346,9 +346,15 @@ def feedback_from_not_own_article
end
describe '#bulkops action' do
- it 'should redirect to action' do
- post :bulkops, :bulkop_top => 'destroy all spam'
- @response.should redirect_to(:action => 'index')
+ it "redirect to index" do
+ post :bulkops, bulkop_top: 'destroy all spam'
+ @response.should redirect_to(action: 'index')
+ end
+
+ it "mark comments as spam" do
+ comment = FactoryGirl.create(:comment, state: :presumed_spam)
+ post :bulkops, bulkop_top: 'Mark Checked Items as Spam', feedback_check: {comment.id.to_s => "on"}
+ comment.reload.should be_spam
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.