mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 17:55:55 +02:00
Add tests for force delete email from hold domains
This commit is contained in:
parent
04de5da193
commit
f6df99237f
1 changed files with 18 additions and 0 deletions
18
test/interactions/force_delete_email/base_test.rb
Normal file
18
test/interactions/force_delete_email/base_test.rb
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
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
|
Loading…
Add table
Add a link
Reference in a new issue