added cached columns for post update count, post upload count, note update count, favorite count to users; fixed tests
This commit is contained in:
@@ -56,6 +56,12 @@ class NoteTest < ActiveSupport::TestCase
|
||||
@note = Factory.create(:note, :post => @post)
|
||||
end
|
||||
|
||||
should "increment the updater's note_update_count" do
|
||||
assert_difference("CurrentUser.note_update_count", 1) do
|
||||
@note.update_attributes(:body => "zzz")
|
||||
end
|
||||
end
|
||||
|
||||
should "update the post's last_noted_at field" do
|
||||
assert_nil(@post.last_noted_at)
|
||||
@note.update_attributes(:x => 1000)
|
||||
|
||||
Reference in New Issue
Block a user