mirror of
https://github.com/internetee/registry.git
synced 2025-06-05 20:27:30 +02:00
parent
5e5a38eb8e
commit
445cff4a29
2 changed files with 16 additions and 1 deletions
|
@ -86,7 +86,7 @@ module DNS
|
|||
attr_reader :name
|
||||
|
||||
def not_auctionable?
|
||||
blocked? || reserved? || disputed?
|
||||
blocked? || reserved? || disputed? || pending_auction.present?
|
||||
end
|
||||
|
||||
def zone_with_same_origin?
|
||||
|
|
|
@ -32,6 +32,21 @@ class DomainReleasableAuctionableTest < ActiveJob::TestCase
|
|||
assert_not @domain.domain_name.at_auction?
|
||||
end
|
||||
|
||||
def test_skips_auction_when_auction_present
|
||||
assert_equal 'shop.test', @domain.name
|
||||
Auction.create!(domain: @domain.name, status: Auction.statuses[:started])
|
||||
|
||||
assert_difference '@domain.registrar.notifications.count', 1 do
|
||||
assert_no_difference 'Auction.count' do
|
||||
@domain.release
|
||||
end
|
||||
end
|
||||
|
||||
assert_raises ActiveRecord::RecordNotFound do
|
||||
@domain.reload
|
||||
end
|
||||
end
|
||||
|
||||
def test_skips_auction_when_domains_is_reserved
|
||||
assert_equal 'shop.test', @domain.name
|
||||
reserved_domains(:one).update!(name: 'shop.test')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue