Commit f49dbb2e6fe689f008864e6f1a0e786b98e2043d
1 parent
8cc8aa8e
Exists in
master
and in
29 other branches
Marking comments as ham atomically
ActionItem2306
Showing
2 changed files
with
12 additions
and
0 deletions
Show diff stats
app/models/comment.rb
test/unit/comment_test.rb
... | ... | @@ -460,4 +460,11 @@ class CommentTest < ActiveSupport::TestCase |
460 | 460 | assert_equivalent [c3], Comment.spam |
461 | 461 | end |
462 | 462 | |
463 | + should 'be able to mark as ham atomically' do | |
464 | + c1 = fast_create(Comment, :name => 'foo', :email => 'foo@example.com', :spam => true) | |
465 | + c1.ham! | |
466 | + c1.reload | |
467 | + assert c1.ham? | |
468 | + end | |
469 | + | |
463 | 470 | end | ... | ... |