Remove app-level association validation

This commit is contained in:
Artur Beljajev 2018-08-24 14:18:40 +03:00
parent a1fb0e2e61
commit 1183d06c09
2 changed files with 1 additions and 6 deletions

View file

@ -1,6 +1,6 @@
class Notification < ActiveRecord::Base
include Versions # version/notification_version.rb
belongs_to :registrar, required: true
belongs_to :registrar
scope :unread, -> { where(read: false) }

View file

@ -14,11 +14,6 @@ class NotificationTest < ActiveSupport::TestCase
assert @notification.invalid?
end
def test_invalid_without_registrar
@notification.registrar = nil
assert @notification.invalid?
end
def test_unread_by_default
notification = Notification.new(registrar: registrars(:bestnames), text: 'test')
assert notification.unread?