mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
added tests
This commit is contained in:
parent
9f1cf8f620
commit
c22232ce07
4 changed files with 24 additions and 4 deletions
|
@ -99,10 +99,21 @@ class DomainReleasableAuctionableTest < ActiveJob::TestCase
|
|||
assert_not @domain.domain_name.at_auction?
|
||||
end
|
||||
|
||||
def test_ignores_domains_with_server_delete_prohibited_status
|
||||
def test_does_not_ignore_domains_with_server_delete_prohibited_status
|
||||
@domain.update!(delete_date: '2010-07-04', statuses: [DomainStatus::SERVER_DELETE_PROHIBITED])
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
|
||||
assert_changes 'Domain.count' do
|
||||
Domain.release_domains
|
||||
end
|
||||
|
||||
assert @domain.domain_name.at_auction?
|
||||
end
|
||||
|
||||
def test_ignores_domains_with_server_release_prohibited_status
|
||||
@domain.update!(delete_date: '2010-07-04', statuses: [DomainStatus::SERVER_RELEASE_PROHIBITED])
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
|
||||
assert_no_difference 'Domain.count' do
|
||||
Domain.release_domains
|
||||
end
|
||||
|
|
|
@ -51,13 +51,23 @@ class DomainReleasableDiscardableTest < ActiveSupport::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_ignores_domains_with_server_delete_prohibited_status
|
||||
def test_does_not_ignore_domains_with_server_delete_prohibited_status
|
||||
@domain.update!(delete_date: '2010-07-04', statuses: [DomainStatus::SERVER_DELETE_PROHIBITED])
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
|
||||
Domain.release_domains
|
||||
@domain.reload
|
||||
|
||||
assert @domain.discarded?
|
||||
end
|
||||
|
||||
def test_ignores_domains_with_server_release_prohibited_status
|
||||
@domain.update!(delete_date: '2010-07-04', statuses: [DomainStatus::SERVER_RELEASE_PROHIBITED])
|
||||
travel_to Time.zone.parse('2010-07-05')
|
||||
|
||||
Domain.release_domains
|
||||
@domain.reload
|
||||
|
||||
assert_not @domain.discarded?
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue