Fix note_update_count increment test.

5) Failure:
NoteTest#test_: In all cases updating a note should increment the updater's note_update_count. [/home/danbooru/src/danbooru/test/unit/note_test.rb:113]:
"CurrentUser.note_update_count" didn't change by 1.
Expected: 1
  Actual: 0
This commit is contained in:
evazion
2017-02-03 01:49:30 -06:00
parent 27817cffcf
commit e98e7f1ea7

View File

@@ -148,6 +148,7 @@ class Note < ActiveRecord::Base
def create_version
User.where(id: CurrentUser.id).update_all("note_update_count = note_update_count + 1")
CurrentUser.reload
if merge_version?
merge_version