mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 20:27:30 +02:00
18 lines
512 B
Ruby
18 lines
512 B
Ruby
require 'test_helper'
|
|
|
|
class BaseTest < ActiveSupport::TestCase
|
|
def test_hold_domains_force_delete_email
|
|
domain = domains(:shop)
|
|
domain.update!(statuses: [DomainStatus::SERVER_HOLD])
|
|
domain.update!(expire_time: Time.zone.now + 1.year)
|
|
|
|
registrant = domain.registrant
|
|
registrant.update!(email: "#{registrant.email.split('@').first}@#{domain.name}")
|
|
|
|
Domains::ForceDeleteEmail::Base.run(email: registrant.email)
|
|
|
|
domain.reload
|
|
|
|
assert_not domain.force_delete_scheduled?
|
|
end
|
|
end
|