Fix post_update_count increment test.

7) Failure:
PostTest#test_: Tagging: A post that has been updated should increment the updater's post_update_count. [/home/danbooru/src/danbooru/test/unit/post_test.rb:1010]:
"CurrentUser.post_update_count" didn't change by 1.
Expected: 1
  Actual: 3
This commit is contained in:
evazion
2017-02-03 01:56:11 -06:00
parent e98e7f1ea7
commit a327854017
2 changed files with 8 additions and 3 deletions

View File

@@ -1436,6 +1436,8 @@ class Post < ActiveRecord::Base
def create_new_version
User.where(id: CurrentUser.id).update_all("post_update_count = post_update_count + 1")
CurrentUser.reload
versions.create(
:rating => rating,
:source => source,