fix tests
This commit is contained in:
@@ -255,8 +255,8 @@ class Dmail < ApplicationRecord
|
||||
end
|
||||
|
||||
def mark_as_read!
|
||||
update_column(:is_read, true)
|
||||
owner.dmails.unread.count.tap do |unread_count|
|
||||
update_column(:is_read, true)
|
||||
owner.update(has_mail: (unread_count > 0), unread_dmail_count: unread_count)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -564,7 +564,7 @@ class Post < ApplicationRecord
|
||||
|
||||
if PostKeeperManager.enabled? && persisted?
|
||||
# no need to do this check on the initial create
|
||||
PostKeeperManager.check_and_update(self, CurrentUser.id, increment_tags)
|
||||
PostKeeperManager.check_and_assign(self, CurrentUser.id, increment_tags)
|
||||
|
||||
# run this again async to check for race conditions
|
||||
PostKeeperManager.queue_check(self, CurrentUser.id)
|
||||
|
||||
Reference in New Issue
Block a user