tests: fix broken source tests.

Fix various tests broken by source files changing or being deleted.
This commit is contained in:
evazion
2020-11-10 14:38:17 -06:00
parent 3ce8c7f004
commit cc64f8b7ee
6 changed files with 24 additions and 21 deletions

View File

@@ -155,7 +155,7 @@ class Dmail < ApplicationRecord
end
def validate_sender_is_not_limited
return if from.is_gold?
return if from.blank? || from.is_gold?
if from.dmails.where("created_at > ?", 1.hour.ago).group(:to).reorder(nil).count.size >= 10
errors[:base] << "You can't send dmails to more than 10 users per hour"