Skip auction for blocked and reserved domains

Closes #1120
This commit is contained in:
Artur Beljajev 2019-03-22 16:26:55 +02:00
parent ce1a5fd5f1
commit e6405c5fc8
4 changed files with 45 additions and 1 deletions

View file

@ -22,6 +22,24 @@ class DomainReleasableAuctionableTest < ActiveSupport::TestCase
assert @domain.domain_name.at_auction?
end
def test_skips_auction_when_domains_is_blocked
assert_equal 'shop.test', @domain.name
blocked_domains(:one).update!(name: 'shop.test')
@domain.release
assert_not @domain.domain_name.at_auction?
end
def test_skips_auction_when_domains_is_reserved
assert_equal 'shop.test', @domain.name
reserved_domains(:one).update!(name: 'shop.test')
@domain.release
assert_not @domain.domain_name.at_auction?
end
def test_deletes_registered_domain
@domain.update!(delete_at: Time.zone.parse('2010-07-05 07:59'))
travel_to Time.zone.parse('2010-07-05 08:00')