mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 00:12:03 +02:00
improve notification feature
This commit is contained in:
parent
053382ffa3
commit
35f60e53e5
5 changed files with 37 additions and 16 deletions
22
test/services/contact_notification_test.rb
Normal file
22
test/services/contact_notification_test.rb
Normal file
|
@ -0,0 +1,22 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ContactNotificationTest < ActionMailer::TestCase
|
||||
|
||||
setup do
|
||||
@domain = domains(:shop)
|
||||
@text = 'text'
|
||||
end
|
||||
|
||||
def test_notify_registrar
|
||||
assert_difference -> { @domain.registrar.notifications.count } do
|
||||
ContactNotification.notify_registrar(domain: @domain, text: @text)
|
||||
end
|
||||
end
|
||||
|
||||
def test_notify_tech_contacts
|
||||
ContactNotification.notify_tech_contact(domain: @domain, text: @text)
|
||||
assert_equal @domain.tech_contacts.count, 2
|
||||
assert_emails 2
|
||||
end
|
||||
end
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue