mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Add tests
This commit is contained in:
parent
fe294acd57
commit
4e2ba1f18b
1 changed files with 5 additions and 0 deletions
|
@ -14,18 +14,22 @@ class DomainDeleteMailerTest < ActiveSupport::TestCase
|
|||
|
||||
def test_delivers_domain_delete_confirmation_email
|
||||
assert_equal 'shop.test', @domain.name
|
||||
assert_equal 'john@inbox.test', @domain.registrant.email
|
||||
|
||||
email = DomainDeleteMailer.confirmation(domain: @domain,
|
||||
registrar: @domain.registrar,
|
||||
registrant: @domain.registrant).deliver_now
|
||||
|
||||
assert_emails 1
|
||||
assert_equal ['john@inbox.test'], email.to
|
||||
assert_equal 'Kinnitustaotlus domeeni shop.test kustutamiseks .ee registrist' \
|
||||
' / Application for approval for deletion of shop.test', email.subject
|
||||
end
|
||||
|
||||
def test_delivers_domain_force_delete_email
|
||||
assert_equal 'shop.test', @domain.name
|
||||
assert_equal 'john@inbox.test', @domain.registrant.email
|
||||
assert_equal 'jane@mail.test', @domain.admin_contacts.first.email
|
||||
|
||||
email = DomainDeleteMailer.forced(domain: @domain,
|
||||
registrar: @domain.registrar,
|
||||
|
@ -34,6 +38,7 @@ class DomainDeleteMailerTest < ActiveSupport::TestCase
|
|||
.first).deliver_now
|
||||
|
||||
assert_emails 1
|
||||
assert_equal %w[jane@mail.test john@inbox.test], email.to
|
||||
assert_equal 'Domeen shop.test on kustutusmenetluses' \
|
||||
' / Domain shop.test is in deletion process' \
|
||||
' / Домен shop.test в процессе удаления', email.subject
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue