mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
27 lines
No EOL
521 B
Ruby
27 lines
No EOL
521 B
Ruby
require 'test_helper'
|
|
|
|
class NotificationTest < ActiveSupport::TestCase
|
|
setup do
|
|
@notification = notifications(:greeting)
|
|
end
|
|
|
|
def test_valid
|
|
assert @notification.valid?
|
|
end
|
|
|
|
def test_invalid_without_body
|
|
@notification.body = nil
|
|
assert @notification.invalid?
|
|
end
|
|
|
|
def test_invalid_without_registrar
|
|
@notification.registrar = nil
|
|
assert @notification.invalid?
|
|
end
|
|
|
|
def test_dequeue
|
|
@notification.dequeue
|
|
@notification.reload
|
|
assert_not @notification.queued?
|
|
end
|
|
end |