mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 11:38:30 +02:00
Remove app-level association validation
This commit is contained in:
parent
a1fb0e2e61
commit
1183d06c09
2 changed files with 1 additions and 6 deletions
|
@ -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) }
|
||||
|
||||
|
|
|
@ -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?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue