mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
Add new mailer template for expired soft delete domains
This commit is contained in:
parent
b35eb160a6
commit
c3f63ed43a
6 changed files with 146 additions and 12 deletions
|
@ -11,4 +11,13 @@ class DomainExpireMailerTest < ActionMailer::TestCase
|
|||
assert_equal 'Domeen shop.test on aegunud / Domain shop.test has expired' \
|
||||
' / Срок действия домена shop.test истек', email.subject
|
||||
end
|
||||
end
|
||||
|
||||
def test_delivers_domain_expiration_soft_email
|
||||
domain = domains(:shop)
|
||||
assert_equal 'shop.test', domain.name
|
||||
|
||||
DomainExpireMailer.expired_soft(domain: domain, registrar: domain.registrar).deliver_now
|
||||
|
||||
assert_emails 1
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,4 +4,10 @@ class DomainExpireMailerPreview < ActionMailer::Preview
|
|||
DomainExpireMailer.expired(domain: domain,
|
||||
registrar: domain.registrar)
|
||||
end
|
||||
end
|
||||
|
||||
def expired_soft
|
||||
domain = Domain.first
|
||||
DomainExpireMailer.expired_soft(domain: domain,
|
||||
registrar: domain.registrar)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue